Update Uptated-Prototype/TTS-Script-PiperTTS.py

This commit is contained in:
2025-11-16 10:06:58 -08:00
parent f7df51d12a
commit 4c9cafc880

View File

@@ -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."