From 4c9cafc88022f6dd79ce06d013d97615da01a534 Mon Sep 17 00:00:00 2001 From: fithwum Date: Sun, 16 Nov 2025 10:06:58 -0800 Subject: [PATCH] Update Uptated-Prototype/TTS-Script-PiperTTS.py --- Uptated-Prototype/TTS-Script-PiperTTS.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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."