mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
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
This commit is contained in:
parent
08b5181555
commit
5f14f0126f
278 changed files with 33 additions and 351861 deletions
|
|
@ -1,51 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SpeechRecognitionError.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
SpeechRecognitionError::SpeechRecognitionError(
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent)
|
||||
: Event(aOwner, aPresContext, aEvent)
|
||||
, mError()
|
||||
{
|
||||
}
|
||||
|
||||
SpeechRecognitionError::~SpeechRecognitionError() {}
|
||||
|
||||
already_AddRefed<SpeechRecognitionError>
|
||||
SpeechRecognitionError::Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const SpeechRecognitionErrorInit& aParam,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
RefPtr<SpeechRecognitionError> e = new SpeechRecognitionError(t, nullptr, nullptr);
|
||||
bool trusted = e->Init(t);
|
||||
e->InitSpeechRecognitionError(aType, aParam.mBubbles, aParam.mCancelable, aParam.mError, aParam.mMessage);
|
||||
e->SetTrusted(trusted);
|
||||
e->SetComposed(aParam.mComposed);
|
||||
return e.forget();
|
||||
}
|
||||
|
||||
void
|
||||
SpeechRecognitionError::InitSpeechRecognitionError(const nsAString& aType,
|
||||
bool aCanBubble,
|
||||
bool aCancelable,
|
||||
SpeechRecognitionErrorCode aError,
|
||||
const nsAString& aMessage)
|
||||
{
|
||||
Event::InitEvent(aType, aCanBubble, aCancelable);
|
||||
mError = aError;
|
||||
mMessage = aMessage;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef SpeechRecognitionError_h__
|
||||
#define SpeechRecognitionError_h__
|
||||
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/SpeechRecognitionErrorBinding.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class SpeechRecognitionError : public Event
|
||||
{
|
||||
public:
|
||||
SpeechRecognitionError(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent);
|
||||
virtual ~SpeechRecognitionError();
|
||||
|
||||
static already_AddRefed<SpeechRecognitionError>
|
||||
Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const SpeechRecognitionErrorInit& aParam,
|
||||
ErrorResult& aRv);
|
||||
|
||||
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
|
||||
{
|
||||
return mozilla::dom::SpeechRecognitionErrorBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
void
|
||||
GetMessage(nsAString& aString)
|
||||
{
|
||||
aString = mMessage;
|
||||
}
|
||||
|
||||
SpeechRecognitionErrorCode
|
||||
Error()
|
||||
{
|
||||
return mError;
|
||||
}
|
||||
|
||||
void
|
||||
InitSpeechRecognitionError(const nsAString& aType,
|
||||
bool aCanBubble,
|
||||
bool aCancelable,
|
||||
SpeechRecognitionErrorCode aError,
|
||||
const nsAString& aMessage);
|
||||
|
||||
protected:
|
||||
SpeechRecognitionErrorCode mError;
|
||||
nsString mMessage;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // SpeechRecognitionError_h__
|
||||
|
|
@ -73,9 +73,6 @@ EXPORTS.mozilla.dom += [
|
|||
'XULCommandEvent.h',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WEBSPEECH']:
|
||||
EXPORTS.mozilla.dom += ['SpeechRecognitionError.h']
|
||||
|
||||
SOURCES += [
|
||||
'AnimationEvent.cpp',
|
||||
'AsyncEventDispatcher.cpp',
|
||||
|
|
@ -127,9 +124,6 @@ SOURCES += [
|
|||
'XULCommandEvent.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WEBSPEECH']:
|
||||
SOURCES += ['SpeechRecognitionError.cpp']
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue