Update Uptated-Prototype/TTS-Script-PiperTTS.py
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
# Theoretical Upgrade Test
|
||||
from piper.voice import PiperVoice # Backbone of text to speech
|
||||
import pyaudio
|
||||
import subprocess
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
result = subprocess.run(["xsel"], capture_output=True, text=True) # In Theory grab selected text into Varible called TextToSpeak
|
||||
time.sleep(1)
|
||||
#print(result) # In Theory grab selected text and print ot to terminal
|
||||
|
||||
texttospeak = str(result.stdout)
|
||||
@@ -35,7 +34,6 @@ stream.write(first_chunk.audio_int16_bytes) # Play the first chunk
|
||||
|
||||
for chunk in chunks: # Play subsequent chunks of audio
|
||||
stream.write(chunk.audio_int16_bytes)
|
||||
input()
|
||||
|
||||
# Cleanup
|
||||
stream.stop_stream()
|
||||
|
||||
Reference in New Issue
Block a user