summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-20 10:19:04 +0000
committerMoonchild <moonchild@palemoon.org>2020-05-20 14:04:17 +0000
commit99c2e698d2a3c56649e42d8d2133706cd8c9501e (patch)
tree85be449d772eb57860f0f386efb4bc1e790fd498 /layout
parent15ac4021b06d549e47c9e2efc9364a9eb96bfe82 (diff)
downloadUXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.gz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.lz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.xz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.zip
Issue #1538 - remove speech recognition engine
This removes speech recognition, pocketsphinx, training models and the speech automated test interface. This also re-establishes proper use of MOZ_WEBSPEECH to work for the speech API (synthesis part only) that was a broken mess before, with some synth parts being always built, some parts being built only with it enabled and recognition parts being dependent on it. I'm pretty sure it'd be totally busted if you'd ever have tried building without MOZ_WEBPEECH before. Tested that synthesis still works as-intended. This resolves #1538
Diffstat (limited to 'layout')
-rw-r--r--layout/build/moz.build7
-rw-r--r--layout/build/nsLayoutModule.cpp31
2 files changed, 0 insertions, 38 deletions
diff --git a/layout/build/moz.build b/layout/build/moz.build
index 360fe3c97..b98e8265a 100644
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
@@ -76,16 +76,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
if CONFIG['MOZ_WEBSPEECH']:
LOCAL_INCLUDES += [
- '/dom/media/webspeech/recognition',
'/dom/media/webspeech/synth',
]
-if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
- LOCAL_INCLUDES += [
- '/media/pocketsphinx',
- '/media/sphinxbase',
- ]
-
if CONFIG['MOZ_SECUREELEMENT']:
LOCAL_INCLUDES += [
'/dom/secureelement',
diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp
index 4455da122..8a078194c 100644
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -91,12 +91,6 @@
#include "mozilla/OSFileConstants.h"
#include "mozilla/Services.h"
-#ifdef MOZ_WEBSPEECH_TEST_BACKEND
-#include "mozilla/dom/FakeSpeechRecognitionService.h"
-#endif
-#ifdef MOZ_WEBSPEECH_POCKETSPHINX
-#include "mozilla/dom/PocketSphinxSpeechRecognitionService.h"
-#endif
#ifdef MOZ_WEBSPEECH
#include "mozilla/dom/nsSynthVoiceRegistry.h"
#endif
@@ -514,13 +508,6 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AudioChannelService, AudioChannelServic
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(WebSocketEventService, WebSocketEventService::GetOrCreate)
-#ifdef MOZ_WEBSPEECH_TEST_BACKEND
-NS_GENERIC_FACTORY_CONSTRUCTOR(FakeSpeechRecognitionService)
-#endif
-#ifdef MOZ_WEBSPEECH_POCKETSPHINX
-NS_GENERIC_FACTORY_CONSTRUCTOR(PocketSphinxSpeechRecognitionService)
-#endif
-
NS_GENERIC_FACTORY_CONSTRUCTOR(nsContentSecurityManager)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCSPContext)
NS_GENERIC_FACTORY_CONSTRUCTOR(CSPService)
@@ -676,12 +663,6 @@ NS_DEFINE_NAMED_CID(UDPSOCKETCHILD_CID);
NS_DEFINE_NAMED_CID(NS_TIMESERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MEDIASTREAMCONTROLLERSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MEDIAMANAGERSERVICE_CID);
-#ifdef MOZ_WEBSPEECH_TEST_BACKEND
-NS_DEFINE_NAMED_CID(NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID);
-#endif
-#ifdef MOZ_WEBSPEECH_POCKETSPHINX
-NS_DEFINE_NAMED_CID(NS_POCKETSPHINX_SPEECH_RECOGNITION_SERVICE_CID);
-#endif
#ifdef MOZ_WEBSPEECH
NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID);
#endif
@@ -912,12 +893,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_AUDIOCHANNEL_SERVICE_CID, false, nullptr, AudioChannelServiceConstructor },
{ &kNS_WEBSOCKETEVENT_SERVICE_CID, false, nullptr, WebSocketEventServiceConstructor },
{ &kNS_FOCUSMANAGER_CID, false, nullptr, CreateFocusManager },
-#ifdef MOZ_WEBSPEECH_TEST_BACKEND
- { &kNS_FAKE_SPEECH_RECOGNITION_SERVICE_CID, false, nullptr, FakeSpeechRecognitionServiceConstructor },
-#endif
-#ifdef MOZ_WEBSPEECH_POCKETSPHINX
- { &kNS_POCKETSPHINX_SPEECH_RECOGNITION_SERVICE_CID, false, nullptr, PocketSphinxSpeechRecognitionServiceConstructor },
-#endif
#ifdef MOZ_WEBSPEECH
{ &kNS_SYNTHVOICEREGISTRY_CID, true, nullptr, nsSynthVoiceRegistryConstructor },
#endif
@@ -1038,12 +1013,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ "@mozilla.org/audiochannel/service;1", &kNS_AUDIOCHANNEL_SERVICE_CID },
{ "@mozilla.org/websocketevent/service;1", &kNS_WEBSOCKETEVENT_SERVICE_CID },
{ "@mozilla.org/focus-manager;1", &kNS_FOCUSMANAGER_CID },
-#ifdef MOZ_WEBSPEECH_TEST_BACKEND
- { NS_SPEECH_RECOGNITION_SERVICE_CONTRACTID_PREFIX "fake", &kNS_FAKE_SPEECH_RECOGNITION_SERVICE_CID },
-#endif
-#ifdef MOZ_WEBSPEECH_POCKETSPHINX
- { NS_SPEECH_RECOGNITION_SERVICE_CONTRACTID_PREFIX "pocketsphinx-en-US", &kNS_POCKETSPHINX_SPEECH_RECOGNITION_SERVICE_CID },
-#endif
#ifdef MOZ_WEBSPEECH
{ NS_SYNTHVOICEREGISTRY_CONTRACTID, &kNS_SYNTHVOICEREGISTRY_CID },
#endif