ohos: Introduce JS TTS engine proxy
Currently, only the JavaScript API provides text-to-speech (TTS)
functionality. This change introduces the TextToSpeechProxy class,
which acts as a C++ proxy for the JS TTS engine and exposes its
functionality through a controlled interface.
Use QOhosExpected to return either TextToSpeechProxy instance or
error string in case of `createEngine()` failure.
The engine must first be initialized via the `createEngine()` call.
Engine is created with following parameters:
* EngineMode::Offline (currently only mode supported)
* SpeechQueueMode::Preemption (don't queue speak requests into engine)
* SpeechPlayType::SynthesisAndPlayback which means that sound is
played by the engine
Since enums values for enigne and speak parameters are casted directly
to int when passing then to the JS code, each enumerator's value is
assigned explicitly.
Once engine is created, it allows use of TTS features such as `speak()`
`stop()` and `listVoices()`
In future commit `setListener()` (for tracking state and errors) will
be added.
Task-number: QTBUG-147179
Pick-to: 6.12
Change-Id: I21e3563659d958a2f1220734066edffd8eb518fe
Reviewed-by: Zbigniew Chyla <zbigniew.chyla@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>