Yesterday, I implemented speech to text in my search function and it works perfectly. But I also wish to add a text to speech now. Being a total newbie when it comes to Javascript, I don’t know how to achieve this. I was only able to add the speech-to-text method due to a clone link I found on the forum. How can I similarly do it for text to speech?
This is certainly something that’s possible. Especially using the anvil.js tools
With the speech to text I mostly followed the documentation at mdn:
and adapted this example app to work in anvil
https://github.com/mdn/web-speech-api/tree/master/speech-color-changer
for text to speech - mdn has similar docs:
And an example:
https://github.com/mdn/web-speech-api/tree/master/speak-easy-synthesis
When we get into the realms of working with javascript it can feel quite off-piste.
And definitely worth taking the time to read over the docs for anvil.js.
Here are some other recent examples that use anvil.js from the forum and the anvil blog
Thanks for the reply.
I couldn’t make it work due to not knowing much about javascript(I tried comparing the speech to text and text to speech javascript and then studying my text to speech anvil project). However, I noticed that Anvil already has pyttsx3 and gtts and they are definitely simpler in my opinion so I’ll use them with uplink until I upgrade my plan.
By the way, I applied for a 7-day trial and got the confirmation email but it doesn’t seem to be working.