07-11-2021 04:50 PM
I can't get textToSpeech to work. Code:
element.onclick = function () {
COBI.app.textToSpeech("APE", function () {
;
});
Nothing to be heard after tapping the element!
Can you pls comment on this?
Solved! Go to Solution.
10-01-2021 10:01 AM
This could be because you havent added a speech element or the text is not recognized. Actually there could be other issues as well, with the rest of the code and not this particular one. I recently tried to develop a chatbot and had converted text to speech. In that I had given the text to speech as 2 options. 1. Online text to speech, 2. Offline text to speech. The codes were entirely different for both. So you will have to specify if this is for online ot offline. For online you can
import gtts
from playsound import playsound
# make request to google to get synthesis
tts = gtts.gTTS("Hello world")
import gtts
from playsound import playsound
It's pretty straightforward to use this library, you just need to pass text to gTTS object that is an interface to Google Translate's Text to Speech API: If your are building a bot then check out Chatbot development services. There are several consulants who can actually help you with this.
02-02-2024 11:43 AM
@bobvlas
you can try the below-mentioned steps
I hope you get over the problem. Also check how the AI consulting team has been working to develop an OpenAI API pricing calculator.