|
|
|
|
@ -28,9 +28,18 @@ class TextToSpeechServiceImp implements TextToSpeechService {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Future<void> speechTextTest(String test) async {
|
|
|
|
|
await textToSpeechInstance.setLanguage(LanguageEnum.arabic.enumToString());
|
|
|
|
|
textToSpeechInstance.setSpeechRate(0.45);
|
|
|
|
|
textToSpeechInstance.setPitch(0.9);
|
|
|
|
|
log("lang: ${await textToSpeechInstance.areLanguagesInstalled(["en", "ar"])}");
|
|
|
|
|
log("getDefaultEngine: ${await textToSpeechInstance.getDefaultEngine}");
|
|
|
|
|
log("getEngines: ${await textToSpeechInstance.getEngines}");
|
|
|
|
|
|
|
|
|
|
// await textToSpeechInstance.setLanguage(LanguageEnum.arabic.enumToString());
|
|
|
|
|
// textToSpeechInstance.setSpeechRate(0.45);
|
|
|
|
|
// textToSpeechInstance.setPitch(0.9);
|
|
|
|
|
|
|
|
|
|
await textToSpeechInstance.setLanguage(LanguageEnum.english.enumToString());
|
|
|
|
|
textToSpeechInstance.setSpeechRate(0.37);
|
|
|
|
|
textToSpeechInstance.setPitch(0.85);
|
|
|
|
|
|
|
|
|
|
await textToSpeechInstance.speak(test);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -94,6 +103,8 @@ class TextToSpeechServiceImp implements TextToSpeechService {
|
|
|
|
|
patientNumeric = queueNoArray[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
patientAlpha = patientAlpha.split('').join(' .. ');
|
|
|
|
|
|
|
|
|
|
if (langEnum == LanguageEnum.english) {
|
|
|
|
|
await textToSpeechInstance.speak("$preVoice $patientAlpha .. $patientNumeric .. $postVoice $roomNo");
|
|
|
|
|
return;
|
|
|
|
|
|