Get audio output directly
See original GitHub issueHello,
i have following code:
text = "Hello, my name is Josef."
targetLanguage = 'de'
tts = gTTS(text, targetLanguage)
tts.save("synthesized.mp3")
Since i play the output directly after this code, is there a way to get the audio output directly as a variable? So i do not have to save and open the mp3 file again.
Thanks! Josef
Issue Analytics
- State:
- Created 8 years ago
- Reactions:11
- Comments:53 (3 by maintainers)
Top Results From Across the Web
How to Connect Speakers to Your TV in 5 Easy Steps
Connecting Your TV to a Speaker System · Step 1: Choose the Type of Speaker · Step 2: Check Your TV's Audio Output...
Read more >How to Connect Your TV to an External Audio System - Lifewire
RCA/Aux: Run RCA cables from TV audio output to input of the speaker system. Set the Audio output from the TV settings.
Read more >How to connect speakers to your TV - SoundGuys
Step 1: Look at the back of your TV · Step 2: Identify your audio output options · Step 3: Reconnect your TV...
Read more >How To Connect External Speakers To A TV Without Audio ...
If you have an optical output, you can simply connect directly to most speakers with optical input or use an optical to RCA...
Read more >How to output microphone directly to speakers? | FAQ - Gigabyte
How to output microphone directly to speakers? · Go to [Control Panel] > [Hardware and Sound] > [Sound]. · Find [Recording] tab >...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This worked for me:
Yes it’s possible. You need a module that will play from a file-like/file object. Instead of doing
tts.save()
you can usetts.write_to_fp()
to write to a file-like object that you can then reuse to play. As a really simple example: