简体   繁体   中英

Make voice pause between phrases on Android (TalkBack and Text-To-Speech)

I am setting the content description for a TextView using setContentDescription method.

The string passed to this method is a concatenation of two sentences separated by a period "."

When TalkBack ot TTS (Text-To-Speech) read this, it does not mark a pause between the two sentences.

My question is, is there a some way to handle this, a special UTF character for example ?

Uncertain if there is any special character available, but another solution might be to split the speech and add

textToSpeech.playSilence(750, TextToSpeech.QUEUE_ADD, null);

then continue with the rest of the split

Try a newline charachter.

To read this barcode: "3S REGR 2345", I found that "3 S\\nR EGR\\n2 3 4 5" got me the result I was after on Samsung TTS.

It will be read as "Three S. REG R. Two Three Four Five"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM