AI Text to Speech in 10 Minutes with Python and Watson TTS
HTML-код
- Опубликовано: 14 окт 2024
- Tired of speaking on webex?
Not so pumped to give that speech?
Just plain can't be bothered talking?
Forget it, just use text to speech to do it for you in 10ish minutes! You can speed up your ability to convert written text to AI powered neural network generated speech in minutes. Plus there's support for a whole bucketload of different languages whether you're speaking Dutch or Mandarin, it's got you covered!
In this video you’ll learn how to:
1. Set up the Watson Text to Speech Service
2. Convert Text to Speech Using Python and Watson
3. Convert Text using different language models including French
Github Repo for the Project:
github.com/nic...
Want to learn more about it all:
Text to Speech API API: cloud.ibm.com/...
Voice Models:cloud.ibm.com/...
Oh, and don't forget to connect with me!
LinkedIn: / nicholasr. .
Facebook: / nickrenotte
GitHub: github.com/nic...
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!
Music by Lakey Inspired
Chill Day - • LAKEY INSPIRED - Chill...
You have to register with IBM to use Watson. To register you have to give them your credit card details, which I am not prepared to do.
First off, great video. I do not know anything about coding and I tried to follow along but I have no idea what I am doing. All I want to do is take a text file and use Watson TTS to create a mp3 file. I realize that this is a video showing how to do just that but I just can't do it. I followed along using the Jupyter webpage but I couldn't get it to work. I just wish I could copy and paste the text into a box and press convert file.
Heya @Alan, I think there used to be a standalone demo that allowed you to download the voice, there is this: www.ibm.com/demos/live/tts-demo/self-service but you're unable to download the speech as a file!
Did you ever get it to work? I don't know if this will help, but an acquaintance of mine told me not to copy and paste any code which includes quotation marks therein because the pasting thereof fails to guarantee that the quotation marks will be identical to those generated when one presses the quotation mark key on one's keyboard. They look like they are identical, but they are not. Therefore they are not recognized.
Thank you for the video.
Any chance to make the speaker sound less robotic?
how to adjust speech rate in google colab?
hey Nic, thaks for the video
plz let me know if there's anyway that we can play the audio file directly
Instead of saving it locally and then playing
Take a look at pydub!
@@NicholasRenotte ok thnx
One last question
Is there a way to do all these by just using javascript ?
It gives me the following error:
[Errno 11001] getaddrinfo failed
on_close() takes 1 positional argument but 3 were given.
Got a full error for me?
@@NicholasRenotte This is the only thing it gives me everytime I run transcribe.py. :(
Thank you so much for this video! Is there a way to get the audio file link instead of the audio itself?
Oooh, I don't believe so, the data isn't stored in the service. Could throw it up into dropbox or something and grab that link?
Great video. How can I resolve the error while executing with open(‘ ‘) statement? ApiException: Error
What's the full error?
LOVE IT! hello nicholas, im new to NLP and ML/AI and just started learning it , im about to work on project of a movil app translator of text to sign language, is any api out there than can help me speed up the process of the project? or any advice on how to approach it? with the little i know i was planing on a sort of clasification model from text to img, but i think it wont be the best thing to do if i want to add also the option to convert the img(sign language image) to text to make the translator more flexible.
keep the good work, this is rlly a great content!
Heya @Arturo 😀, Text to Sign might not require AI/ML. You could just parse the different parts of speech and render video! Are you trying to go the other way as well? Sign to text?
@@NicholasRenotte yeah!, my goal is to do an sign language movil app, i would like to approach both, the non-sign language speakers understanding what a sign language user wants to comunicate and viceversa, but im just starting to get use to this 😅and seen many ways i could posibbly approach it, but your channel so far is the greatest source material i've found for this particular topic, im reconsidering the aproach of the app, real time sign detec. + speech to text and then try to get every word to it's equivalent in sign language to cover both way of comunication, all based on topics i've found on your channel, again thnx! your channel is a gold mine.😊
Awesome stuff @@LpARTURO , let me know how you go! Sounds like there's some architecture stuff to model first, but let me know if you need any pointers!
Great tutorial, but how can you change where the file goes? Right now its saving to my desktop, but I want it to save to another folder. How can I do that?
You skipped the whole part about the watson account creation. ITs supposed to be free, but they're asking for my credit card number. Is this right?
btw also it does not accept any cart
Yeah bro it's not free
Hey thank you for this video! I wondered if there is a way to directly play the voice without creating an mp3 file?
There's some audio players available for Python, could take a look at those!
@@NicholasRenotte thanks tried playsound library but didn’t work. Anyway it’s fine, keep going with this incredible content, you are incredible!
What programming tools could produce the following result?
1.) Play the musical note which was assigned by me to each character of a text file, as it is read aloud by an appropriately coded program.
2.) Or, as each individual key on a QWERTY keyboard is pressed, cause its assigned musical note to play.
As a (partial) example consider:
The string "B V G C T S L" , etc.,
Letter ..........Actual Musical Tone generated
B ........................ C4
V ........................ D4
G ........................ E4
C ........................ F4
T ........................ G4
S ........................ A5
L ........................ B5
etc.,
Thank you sooo much. I have a question, is there any method to integrate IBM TTS to the apple mac speech. I want to call the TTS to read the selected screen text, it is possible?
Ooooh, I think Apple's models are proprietary. I haven't seen that done yet @da da.
@@NicholasRenotte There is a Firefox/Chrome Extension called read aloud. It allows inputing the IBM Watson credential to use IMB TTS.
But it can only read the webpage.
@@MonkeyDLuffy-cq2lo woah, I've never seen that before but it's super cool. Will take a look!
Hi Nic, it was a nice tutorial. I've just tried the code and found this problem: "It is required that you pass in a value for the "algorithms" argument when calling decode()".
Heya @Alvaro, credit goes to one of the other subscribers who figured out this was an issue with PyJWT, try installing 1.7.1 and it should fix the issue. Example install:
pip install PyJWT==1.7.1
Hi! First i just want to say thankyou this video is helping my homework :). But I found an error while saving the mp3 file to my computer. The message say "Error: Provided API key could not be found, Code: 400" even when i use the same code as yours. Can u help me with this? Thx a lot btw :)
Sweet! Oh, did you generate your own apikey @woolfing paca? The one in the video would have been deleted that's why it's probably throwing errors.
Really like the video. Very clear and easy to understand. But is there a way to convert the text to speech live? So when I give the program something to say it immediately says it without converting to an mp3 first?
I haven't seen this for TTS but have seen it for STT: github.com/IBM/watson-streaming-stt
@@NicholasRenotte Thank you for this. I notice that you have a video on speech to text. could I follow that video but use my microphone as the source?
@@asherageh5330 hmmm, without using sockets you would have to save the audio from your mic first then convert. I might do a streaming demo as a live stream this week or next if you wanted a tutorial. Thoughts?
thanks nick. this video been a great help. when I m trying do TTS in Spanish, Spanish text is not being identified correctly. As a result incorrect Spanish audio is getting generated
Hmmm, what's the audio quality like?
Hi Nick, thank you for the helpful video. What if I wanted to make each line a separate audio file? (dividing up the paragraph)
Would just do each line as a separate transcription, i.e. just run one line at a time.
Hello, thanks for the video, it was excellent! One question, how can I add this to an IBM Watson Chat bot? How can I make the chat bot speak to the user?
it was the best video!! Greetings from Peru!!
Thank you! It would be great to add something on using SSML.
Coolio, will add it to the list of videos @Meir!
Thank you @Nicholas Renotte for this amazing video. I'm new at this, I have the same request. Please please give a demo on how to add SSML in the audio file you named churchill. Much love
@@BettersizeInstruments been wanting to get to this for a while now, will bump it up!
Thank you so much that was useful and super simple . Keep it up !!!
Can we use it for youtube vdos? I mean will my channel be monetized if I use this TTS? The new guidelines is against use of TTS I guess! Please help me out.
Oooo, I'm not too sure about that @Rutwik. I'm not super familiar with the YT guidelines on TTS but everything I've read makes it sound like it'll be tough to get monetised if using TTS.
Thanks for the engaging video. Could you please help me with the error message 2:47 zsh:1: command not found: pip ?
Heya @GILS & MADI, didn't see this comment til today! Just checking do you have Python installed? pip normally comes prepackaged with the later versions on Python.
we want to build only tts using gaze tracking ... identification of hard to read words from a passage using gaze tracking and it will ( sytem ) will dictate the word to assist reader .
Wow! Incredible! what mean accept params?
It determines which types of parameters to accept in the API request.
Great job! Hi Nic, following this video, I converted a text file with two sentences into mp3 file successful. I want to have a pause (1 second or 1.5 seconds) between two sentences, how to do it? do you have another video or sample for doing so? Many thanks.
Heya @Kelvin, the easiest way to do it is with commas or spaces. TTS interprets these as pauses!
This project is stunning, i would like to do one similar to one to this.
What can i do in the case that the language i want as a voice output isent included in the list of languages and voices for example Luganda or Lugisu .
How can i go about this!!
Thank you.
Hiya @andy, you could try adapting one of the base languages and fine tuning for those languages!
@@NicholasRenotte Thank you for the reply but what i asking was what can i do get that fine tuning moving. Is there platform or a book any guideline on how i can go about it because am new to nlp and not very sure of what to do to make that idea work. Thanks.
@@andylacron6470 check this out: cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization
hey ,haw can i convert the sign language detection in your previous video to speech with same model mobilenet ?Is that possible
Heya @Sarra, once you've extracted the right you can pass the text to the TTS service and play the audio using something like PyAudio!
I can't find the folder that supposed to have the mp3 files. I followed your instructions on jupyter. Maybe it is because I am using windows or maybe I need to download jupyter, not just use the website version?
Heya @Joseph Park, it should be in the same folder that your Jupyter Notebook is in 😊. Easiest way to find the folder is to:
1. Go back into the command line you started the notebook from
2. Stop the notebook
3. Type the command "start . "
This should open up the folder that your notebook is executing from.
@@NicholasRenotte thank you
Anytime @Joseph Park!
Seems awesome! Is it open source? Can people use it on youtube videos commercially or while making money with ads? If so.. Much respect if IBM keeps stuff like that free for users while keeping it open source. It's always the open source ones that gets to cutting edge brilliance in technology. =) It's the best TTS i have ever heard..
Heya @evolve, the models are consumed via API but there's a super flexible free tier that allows it to be used for a whole bunch of experimentation!
@@evolve101 yah!
Wow, this was super helpful. Any idea on how to circumvent the max characters that are allowed to go to IBM Watson ? Right now your solution works if it is a small amount of text for the file, but if the file is large than a certain amount of characters, you get an error when using your method.
Chunk it up into multiple requests, then concatenate the audio back together.
could we take in microphone input rather than audio file
Check this out: ruclips.net/video/YCyuZM454_I/видео.html
OMG, super details ! Thank you !
👋 glad you enjoyed it @amy gao!
Can AI interpret numerical trends then convert it speech? E.g. video game, sports commentary at halftime.
Hi Nicholas.
Could you put up a tutorial for image segmentation?
Yup, working on it as we speak. Code is 80% done just need to finish the viz components!
@@NicholasRenotte great! Thanks.
Sir,I could find the speech.mp3 file and its showing that the size if of 0B.and I'm unable to play that also..Could you help me out?
Heya @Aruthra, do you get any output from the API when you run the command?
Hello friend, I am Brazilian, I would like to know if it is possible to convert the voice from another language to PT-BR.
Could convert the text from PT-BR first then run it through the TTS pipeline.
That was a very useful tutorial. Thank you.
✌thanks so much @Johan!
Thanks for a super Tutorial Nicholas.
I am stuck with this error message, cant seem to resolve it with the resources available on google.
Any help would be greatly appreciated.
theres an error when I play the mp3, "This file isn't playable. That might be because the file type is unsupported, the file extension is incorrect, or the file is corrupt." i tried installing other media player but still error.
Hmmm, tried playing it on another device?
Thank you @Nicholas Renotte for this amazing video. I'm new at this, I have the same request. Please please give a demo on how to add SSML in the audio file you named churchill. Much love
You got it! Vid planned!
@@NicholasRenotte Thank you!
@@NicholasRenotte It will make my day. Thank you so much!
@@BettersizeInstruments anytime! You're welcome, stay tuned!
Hi, how to "link" Jupyter and our computer (to have localhost in the adress bar instead of Jupyter's url) ? Thanks
Heya @Cochon, normally you can use localhost:8888 or the link available from the command line. Alternatively you can delve a little deeper with something like this: jupyter-notebook.readthedocs.io/en/stable/public_server.html
Great video. How can I resolve DecodeError that I get after executing with open(‘ ‘) statement?
DecodeError: It is required that you pass in a value for the “algorithms” argument when calling decode().
Heya @Deepak, can you share your sample code (excluding API keys) using codeshare.io? Also, was there a larger error?
Hi @@NicholasRenotte ,as an absolute novice, from what I read, think it’s due to recent upgrades.Here is the url for share code codeshare.io/al6Yoj
@@deepakchand3092 one of the other subscribers figured out this was an issue with PyJWT, try installing 1.7.1 and it should fix the issue. Example install:
pip install PyJWT==1.7.1
@@NicholasRenotte Thank you Nick, and happy 2021 :)
Hi Nick, since you have so much experience and insight (at least in Australian context), which specialisation/jobs in computer science you reckon would allow remote working/working from home. Thank you in advance.
hi nicholas, your code works fine, it's great & exactly what i was looking for.
NOW I HAVE A QUESTION, HOW TO REDUCE THE SPEECH SPEED BY 20%. CAN YOU SHARE CODE FOR THAT AS WELL.
I WILL BE MOST THANKFUL.
Heya! You can add , or to break up the text and push it out slower! Check this out: cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-timing
@@NicholasRenotte Thanks for the quality tutorial! Is there a way to add the rate SSML property inside python code?
Decrease speaking rate by 25%
how to change the pitch of the speaker ??
Check this out: medium.com/ibm-data-ai/tune-by-example-how-to-tune-watson-text-to-speech-for-better-intonations-bcee8404d927
@@NicholasRenotte Thankyou so much .
I still have a difficult time doing this. I can't understand how you get 2 in "In [ ]" and so on. I thought you suppose to run all the cells, so that what I find so confusing.
Heya @Jonathan, this is standard jupyter notebook functionality, check this out for a crash course: realpython.com/jupyter-notebook-introduction/
hey im new to this i did everything i just cant find that folder in the end where you have your audio file
Heya @Filip! No stress let's work through it, did you walk through the repository here: github.com/nicknochnack/TextToSpeech
Where is your Jupyter Notebook located?
@@MarcillaSmith link's in the description 😊!
@@NicholasRenotte sorry, I was addressing the OP. I'm happy to report I got it running with no snags (other than my usual typos!). Thanks for UL'ing!
@@MarcillaSmith oh my bad! Awesome work!!
Can i use a my Voice and not the predefined voices that i see in the video ?
I believe you can fine tune it, haven't done a vid on it yet though @Its me Maldy!
how do we access the text to speech document ????
Is there a way to have each sentence be saved at it's own mp3 file?
Heya @Mike Pierce! Definitely, try this:
# Open file as per normal
with open('churchill.txt', 'r') as f:
text = f.readlines()
# Remove line break
text = [line.replace('
','') for line in text]
# Output each individual file as it's own mp3
counter = 0
for sentence in text:
with open('{counter:04d}.mp3'.format(counter=counter), 'wb') as audio_file:
res = tts.synthesize(sentence, accept='audio/mp3', voice='en-GB_JamesV3Voice').get_result()
audio_file.write(res.content)
counter +=1
hello nicholas I need a Turkish speaking voice, how can I find it?
Heya @Ilker, doesn't look likt there's a Turkish voice available unfortunately.
after typing !pip install imb_watson I got ERROR: Could not find a version that satisfies the requirement imb_watson (from versions: none)
Try !pip install ibm_watson
Thanks. This was a great follow-along. I used Google Colab to code along with you and take my own notes. Impressively easy to follow along. I found your video searching for a way to make some RUclips-friendly voices for low-cost voice actors in an upcoming short film I'm working on. One question I have for future ideas for use, how would I go about training a model to be a voice from sound files (I have a ton of sound files of one person's voice--how do I make that a trained model to use like the "voices" here in this example)?
Heya E. O., check this out: medium.com/ibm-data-ai/tune-by-example-how-to-tune-watson-text-to-speech-for-better-intonations-bcee8404d927
Im getting an error message
"ModuleNotFoundError Traceback (most recent call last)
in
1 from ibm_watson import TextToSpeechV1
----> 2 from IBM_cloud_sdk_core.authenticators import IAMAuthenticator
ModuleNotFoundError: No module named 'IBM_cloud_sdk_core'
"
Can you help me with this?
Definitely @Ace St. John! That error is because the cloud sdk library is not installed. Just run this line of code in your notebook in a new cell to install the cloud SDK.
!pip install ibm-cloud-sdk-core
@@NicholasRenotte Awesome! thank you! Last question... What if I have a LARGE text file that I want to convert to MP3... is there a size limit that you know of?
No problemo @@AceStJohn , there's an 8KB limit for a single synthesis (GET) request. If you hit that limit you can chunk it up and combine them back together using ffmpeg. This video shows how to do it with STT but it would be a similar process with TTS: ruclips.net/video/ZUsaIOTJvM4/видео.html
Thank you a lot, exactly what i was looking for!!!
can we use google speech to text for this instead for IBM watson?
Hi I get this error please help me
Decode Error : It is required you pass in a value for the "algorithm" argument when calling decode()
Heya one of the other subscribers figured out this was an issue with PyJWT, try installing 1.7.1 and it should fix the issue. Example install:
pip install PyJWT==1.7.1
it would be great to come up with a solution that integrates STT and TTS to create a live translator and adapt it on a device, sorry for the bad english
such an easy way to learn it was mighty useful!
Thanks so much @Clarisse Alvarenga! Anything else you'd like to see or learn?!
@@NicholasRenotte yes!!! I'm starting in the business and would love to learn to make an python API integrating STT and NLU
Do I have to learn to coding to do this?
A little but I take it step by step!
@@NicholasRenotte ok thanks
Can I follow same procedure to access custom service built in IBM watson?
Heya @GameON, a custom TTS service?
In my case Im using custom visual recognition service,I have tested it with the watson interface after training.But I want to use the service from python file.. Is it possible? I'm new to this interface and any idea would help,thanks
Definitely!! I run through how to do it in this video: ruclips.net/video/T9KfYaS9hwQ/видео.html
@Nicholas Renotte exactly what I was looking for..excellent video Thanks a lot!
Anytime!! Let me know how you go, HMU if you need any help!
Is there a way to use this to create audiobooks? I keep hitting a cap on the text file I'm sending. I guess the best way to go about it would be to break up the text file send it to IBM then combine the output into a single file... I just have no idea what I'm doing.
With audio books, you'll probably hit the cap pretty quickly. But you're right, you could break it up and get the output :)
does this project include data mining tooo??
I'm going to trying this...
thanks 👍🏻
Nice Nick,... haha that beret on you :D :D
Hahaha, I had to dig it out of my wardrobe this morning!
@@NicholasRenotte Lol :D
Hermanito , usted es un " vergatario " no pares de publicar contenido sobre Ptyhon . 🐍
Muchas gracias
I just completed this tutorial and it worked perfectly. This was a big help for me.
Hell yes! Awesome to hear @Mike!
sir how can we convert sign language the single letter to WORDS..
Watson TTS voices are not at a high enough maturity level and still sound over processed like someone is speaking under water. It happens when you put too much of a hard limiter on the sound. Descript voices are further along than this. I wonder if Google and or Amazon have anything in the pipeline to compete?
Merci bien Nick😃
7:50 to hear an example ... not great but also not that bad
10:21 longer text
Thanks for annotating @Khan!
thank you so much for a great video!!!
Thanks for checking it out!
Sir , how can I use my own tts voice in text to speech app. Can anybody plz help me..
Take a look at voice cloners :)
11:07 ahahah man you are the best!!!
I'm getting error :(
: Error: No such child resource., Code: 404 , X-global-transaction-id: 0075f199d2533fdac46e7f3d9796ff27
Heya @Parth, can you double check your APIKey and URL?
@@NicholasRenotte hey thanks for the reply
Yes i did.
@@parthdeshmukh9548 hmm, you generated a new service on IBM Cloud and used those credentials?
@@NicholasRenotte Yes i generated new credentials, and i was getting error, but when i switched to language translation and identification it worked there.. so no issues now.
Thankyou so much man!
@@parthdeshmukh9548 anytime! Glad you got it up and running!
How it is working UNICODE?
Hmmm? Not too sure of the question.
well thats a lot of work to convert text to speech..
It's all relative @InvestFX! This code can then be embedded into other applications, more often than not that's what the tech is used for.
When i am executing 'Hello world' script.. it is giving me certificate verify failed error..
Double check your URL, might be missing https
How to make a Jarvis can u please tell me
Like from Ironman?
how to add emotion to the speech
to be specific about the video it is 13:56 min long
😂 you got me man!
When I run this in PyCharm rather than Jupyter, I just get a corrupt MP3 file. Anyone know how to fix this?
Heya @Logan, do you get an error on output?
Thank you, man! You're awesome!
Right back at ya, thanks for watching @Xalid Hemidov!
Very good!!!
Thanks a million!!
thank you , it was super easy and understandable 💙
tnx bro it was nice
I'm getting error. I'm not a coder. Pls help!
Definitely, whats the error @Abhirami?
@@NicholasRenotte How do I share the screenshot of my error? It's not getting pasted over here.
@@abhiramisuresh2720 hmm, weird, can you paste the text?
@@NicholasRenotte !pip install ibm_watson
Requirement already satisfied: ibm_watson in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (4.7.1)
Requirement already satisfied: requests=2.0 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from ibm_watson) (2.25.0)
Requirement already satisfied: python_dateutil>=2.5.3 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from ibm_watson) (2.8.1)
Requirement already satisfied: websocket-client==0.48.0 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from ibm_watson) (0.48.0)
Requirement already satisfied: ibm_cloud_sdk_core==1.7.3 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from ibm_watson) (1.7.3)
Requirement already satisfied: PyJWT>=1.7.1 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from ibm_cloud_sdk_core==1.7.3->ibm_watson) (1.7.1)
Requirement already satisfied: six in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from websocket-client==0.48.0->ibm_watson) (1.15.0)
Requirement already satisfied: idna=2.5 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from requests=2.0->ibm_watson) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from requests=2.0->ibm_watson) (2020.12.5)
Requirement already satisfied: chardet=3.0.2 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from requests=2.0->ibm_watson) (3.0.4)
Requirement already satisfied: urllib3=1.21.1 in c:\users\abhir\appdata\local\programs\python\python39\lib\site-packages (from requests=2.0->ibm_watson) (1.26.2)
url=api.eu-gb.text-to-speech.watson.cloud.ibm.com/instances/70a6d0e5-f11f-463f-b175-c8fe45d53259
apikey=vLfMPTX0j6d3R1UD9J9i13zLDgLs02vYL7ltnGOxKZtN
File "", line 1
url=api.eu-gb.text-to-speech.watson.cloud.ibm.com/instances/70a6d0e5-f11f-463f-b175-c8fe45d53259
^
SyntaxError: invalid syntax
from ibm_watson import TextToSpeechV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
authenticator=IAMAuthenticator(apikey)
tts=TextToSpeechV1(authenticator=authenticator)
tts.set_service_url(url)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
----> 1 authenticator=IAMAuthenticator(apikey)
2 tts=TextToSpeechV1(authenticator=authenticator)
3 tts.set_service_url(url)
NameError: name 'apikey' is not defined
with open('./speech.mp3','wb')as audio_file:
res=tts.synthesize('Good Morning!',accept='audio/mp3',voice='en_US_MichaelV3Voice').get_result()
audio_file.write(res.content)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
1 with open('./speech.mp3','wb')as audio_file:
----> 2 res=tts.synthesize('Good Morning!',accept='audio/mp3',voice='en_US_MichaelV3Voice').get_result()
3 audio_file.write(res.content)
NameError: name 'tts' is not defined
life-changing w000t!
10,000 characters?
8KB input limit (cloud.ibm.com/apidocs/text-to-speech#getsynthesize) but you can chunk the requests and recombine once processed!
damn it blows my mind bruh
Oh man, gotta love what's possible with ML!
can you help me out
oui oui 👨🎨
Mais oui, bien sur! 👩🏼🎨
Great...
Thanks so much @Manoj!
Thank you very much for such a wonderful video. I am not a coder however I am making an attempt to code for the first time and this is the error that I am getting. Need help
with open('churchill.txt', 'r') as f:
text = f.readlines()
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
in
----> 1 with open('churchill.txt', 'r') as f:
2 text = f.readlines()
FileNotFoundError: [Errno 2] No such file or directory: 'churchill.txt'
This could be contained into 3 minute video, rest is useless talking.
wrong coding... such disappointment
Mmmm, was there an error you got that I can help you with?