Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f99efce2948ad9f817f9e69e3272db98fafce4f0
https://github.com/WebKit/WebKit/commit/f99efce2948ad9f817f9e69e3272db98fafce4f0
Author: ChangSeok Oh <[email protected]>
Date: 2023-01-22 (Sun, 22 Jan 2023)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/PlatformGTK.cmake
M Source/WebCore/PlatformWPE.cmake
M Source/WebCore/platform/GStreamer.cmake
M Source/WebCore/platform/PlatformSpeechSynthesizer.h
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
A Source/WebCore/platform/gstreamer/GUniquePtrFlite.h
A Source/WebCore/platform/gstreamer/PlatformSpeechSynthesizerGStreamer.cpp
A Source/WebCore/platform/gstreamer/WebKitFliteSourceGStreamer.cpp
A Source/WebCore/platform/gstreamer/WebKitFliteSourceGStreamer.h
M Source/WebKit/SourcesGTK.txt
M Source/WebKit/SourcesWPE.txt
A Source/WebKit/UIProcess/gstreamer/WebPageProxyGStreamer.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
A Source/cmake/FindFlite.cmake
M Source/cmake/OptionsGTK.cmake
M Source/cmake/OptionsWPE.cmake
M Tools/Scripts/webkitpy/style/checker.py
Log Message:
-----------
[GStreamer] Implement Speech Synthesis with Flite
https://bugs.webkit.org/show_bug.cgi?id=250628
Reviewed by Philippe Normand.
This change implements the Speech Synthesis part of Web speech with Flite, an
open-source
speech synthesis engine for ports using GStreamer. Once Flite converts texts to
a wave,
GStreamer controls the playback of the wave sound in a GStreamer pipeline.
This patch only implements basic functionalities such as play, pause, resume,
stop, and voice
change. Other fine controls, such as pitch, rate, etc., will be supported in
the following changes.
This change passes 11 out of 13 tests in fast/speechsynthesis. We enable those
tests in this patch,
skipping failed ones temporarily. We will fix the failures in a different bug.
Tests: LayoutTests/fast/speechsynthesis
Combined changes:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/PlatformGTK.cmake:
* Source/WebCore/PlatformWPE.cmake:
* Source/WebCore/platform/GStreamer.cmake:
* Source/WebCore/platform/PlatformSpeechSynthesizer.h:
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp: A new gst
element added, "webkitflitesrc".
(WebCore::registerWebKitGStreamerElements):
* Source/WebCore/platform/gstreamer/GUniquePtrFlite.h: Added.
* Source/WebCore/platform/gstreamer/PlatformSpeechSynthesizerGStreamer.cpp:
Added. This file
implements the playback of speech with given texts.
(WebCore::GstSpeechSynthesisWrapper::GstSpeechSynthesisWrapper):
(WebCore::GstSpeechSynthesisWrapper::~GstSpeechSynthesisWrapper):
(WebCore::GstSpeechSynthesisWrapper::pause):
(WebCore::GstSpeechSynthesisWrapper::resume):
(WebCore::GstSpeechSynthesisWrapper::speakUtterance):
(WebCore::GstSpeechSynthesisWrapper::cancel):
(WebCore::GstSpeechSynthesisWrapper::resetState):
(WebCore::GstSpeechSynthesisWrapper::handleMessage):
(WebCore::PlatformSpeechSynthesizer::create):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore::PlatformSpeechSynthesizer::resetState):
* Source/WebCore/platform/gstreamer/WebKitFliteSourceGStreamer.cpp: Added. This
file initializes
a gstreamer source element with flite, registers voices.
(webkitFliteSrcConstructed):
(webkitFliteSrcStart):
(webkitFliteSrcStop):
(webkitFliteSrcCreate):
(webkitFliteSrcSetCaps):
(webkit_flite_src_class_init):
(fliteVoices):
(fliteVoice):
(ensureFliteVoicesInitialized):
(webKitFliteSrcSetUtterance):
* Source/WebCore/platform/gstreamer/WebKitFliteSourceGStreamer.h: Added.
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/gstreamer/WebPageProxyGStreamer.cpp: Added.
(WebKit::WebPageProxy::didStartSpeaking):
(WebKit::WebPageProxy::didFinishSpeaking):
(WebKit::WebPageProxy::didPauseSpeaking):
(WebKit::WebPageProxy::didResumeSpeaking):
(WebKit::WebPageProxy::speakingErrorOccurred):
(WebKit::WebPageProxy::boundaryEventOccurred):
(WebKit::WebPageProxy::voicesDidChange):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp: We don't install the speech
synthesis client since
we want to run gstreamer in Web Process.
(WebKit::m_appHighlightsVisible):
* Source/cmake/FindFlite.cmake: Added.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:
* Tools/Scripts/webkitpy/style/checker.py: Add WebKitFliteSourceGStreamer files
for naming exceptions.
Canonical link: https://commits.webkit.org/259197@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes