Commit 5d4f8d63 authored by Adam Blank's avatar Adam Blank
Browse files

Add new file

parent 53d09884
No related merge requests found
Showing with 14 additions and 0 deletions
+14 -0
from pyt2s.services import stream_elements
from pydub import AudioSegment
from pydub.playback import play as p
import io
def play(script):
play_with_voice(script, "Amy")
def play_with_voice(script, voice):
data = stream_elements.requestTTS(script, voice)
song = AudioSegment.from_file(io.BytesIO(data), format="mp3")
p(song)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment