text-to-speech

Web speech API grammar

試著忘記壹切 提交于 2020-08-07 09:48:10
问题 Can somebody please tell me what this const grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghost | white | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white |

How to stop Text to Speech when Voiceover is speaking, or vice versa in Swift?

别来无恙 提交于 2020-07-05 09:18:39
问题 Right now, my app implements AVSpeechSynthesizer to read out instructions for each screen. The app also takes into consideration when Voiceover accessibility feature is enabled. The problem I'm facing now is that the text to speech feature overlaps with the voiceover feature. Is there a solution to detect that when a user navigates to another element on the screen, TTS stops speaking, or when TTS is speaking, voiceover doesn't speak until TTS finishes (the former is preferred though). The

How to stop Text to Speech when Voiceover is speaking, or vice versa in Swift?

删除回忆录丶 提交于 2020-07-05 09:18:17
问题 Right now, my app implements AVSpeechSynthesizer to read out instructions for each screen. The app also takes into consideration when Voiceover accessibility feature is enabled. The problem I'm facing now is that the text to speech feature overlaps with the voiceover feature. Is there a solution to detect that when a user navigates to another element on the screen, TTS stops speaking, or when TTS is speaking, voiceover doesn't speak until TTS finishes (the former is preferred though). The

TextToSpeech : deprecated speak function in API Level 21

吃可爱长大的小学妹 提交于 2020-06-24 19:35:23
问题 I try to use a TextToSpeech in my app, String text = editText.getText().toString(); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); But the function speak(String text, int queueMode, HashMap params) is deprecated in API Level 21. Instead of that, it is adviced to use speak(CharSequence text, int queueMode, Bundle params, String utteranceId). But I don't know how to set it. Thanks 回答1: String text = editText.getText().toString(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

TextToSpeech : deprecated speak function in API Level 21

与世无争的帅哥 提交于 2020-06-24 19:33:31
问题 I try to use a TextToSpeech in my app, String text = editText.getText().toString(); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); But the function speak(String text, int queueMode, HashMap params) is deprecated in API Level 21. Instead of that, it is adviced to use speak(CharSequence text, int queueMode, Bundle params, String utteranceId). But I don't know how to set it. Thanks 回答1: String text = editText.getText().toString(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {