Skip to content

Run in Jupyter notebook #139

Answered by radaevm
radaevm asked this question in Q&A
Discussion options

You must be logged in to vote

ty, works fine with no errors in vscode`s jupyter

import edge_tts
from IPython.display import Audio
from IPython.display import display

VOICE = "en-GB-SoniaNeural"
OUTPUT_FILE = "test.mp3"

TEXT = "Hello World!"

communicate = edge_tts.Communicate(TEXT, VOICE)
await communicate.save(OUTPUT_FILE)

wn = Audio(OUTPUT_FILE, autoplay=True)
display(wn)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rany2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants