diff --git a/Uptated-Prototype/TTS-Script-PiperTTS.py b/Uptated-Prototype/TTS-Script-PiperTTS.py index 0a0d120..1119f2f 100644 --- a/Uptated-Prototype/TTS-Script-PiperTTS.py +++ b/Uptated-Prototype/TTS-Script-PiperTTS.py @@ -1,13 +1,15 @@ # Theoretical Upgrade Test from piper.voice import PiperVoice # Backbone of text to speech import pyaudio -import os import subprocess +import os +import time -result = subprocess.Popen(["xsel"], text=True) -print(result) +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) +texttospeak = str(result.stdout) print(texttospeak) # texttospeak = "Welcome to the world of speech synthesis! This is an example of text-to-speech using Piper TTS."