[FREE] TextTo Speech with Attributes

The discussion is on the AppyBuilder site.

This is an augmented of the TextToSpeech Component to synchronize speech with actions.
Allows you to perform actions specified by attributes inserted into the text

Attributes Examples :

/pau=3000/ - Wait 3 seconds before continuing to talk;
/mrk=marker1/ - Insert bookmark (an event will be generated at this point);
/spr=1.2/ – Set Speech Rate to 1.2 (possible values 1.0 to 2.0).
/ptch=1.5/ – Set Pitch to 1.5 (possible values 1.0 to 2.0).
/vol=0.8/ - Adjust the volume of the speech (possible values 0 to 1.0).
/ptch=1.5,spr=1.3/ - You can specify multiple attributes, with a comma separating.

Text to speak example:

After this phrase, I will linger for 5 seconds. /pau= 5000/
After this phrase the phone will vibrate. /mrk=vibrate, spr=1.6/
I speak more quickly. /pch=1.5, spr= 1/
I speak in a different tone. /pch=1,vol=0.2/
I speak quieter. /vol=0.8/ I speak louder!

Due to the fact that speech is playing in the Alarm sound stream, has become possible to speak without stopping the background music , but only reduce it. This feature is useful, for example, when creating a “smart speaker”.

One new event:

New function in Version 2.1:
StopPlaying

Current version: ScTTS_V2_1.aix (20.1 KB)
Example project: Test_ScTTS_V2.aia (20.9 KB)

11 Likes

That was great extension.Can you added other language option

Hello, this is really useful, thanks!

Is it possible to add a StopPlaying block? I really need that feature, but it is still a great extension. :+1:

Thanks. Yes I will add StopPlaying function. She will be able to interrupt the execution of the script after the end of the phrase that is now being pronounced. However, it will not be able to stop the current phrase.

2 Likes

Updated version with new feature.

1 Like

Brilliant! Wow, that was so quick. Thanks so much :grinning:

this one and kodulars speech to text blocks are using google servers right? what if phones without google services such as new huawei phones use our app when we use this extension or kodulars native one?

im having an issue before speaking and after speaking blocks dont work

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

as from what i checked the before speaking works, sorry but after dosen’t here is image , (i tested it on classic text to speech and worked so
blocks (1)

Try the test project please. I added in the first post.