Update Uptated-Prototype/TTS-Script-PiperTTS.py
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
# Theoretical Upgrade Test
|
# Theoretical Upgrade Test
|
||||||
from piper.voice import PiperVoice # Backbone of text to speech
|
from piper.voice import PiperVoice # Backbone of text to speech
|
||||||
import pyaudio
|
import pyaudio
|
||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
result = subprocess.Popen(["xsel"], text=True)
|
result = subprocess.run(["xsel"], capture_output=True, text=True) # In Theory grab selected text into Varible called TextToSpeak
|
||||||
print(result)
|
time.sleep(1)
|
||||||
|
#print(result) # In Theory grab selected text and print ot to terminal
|
||||||
|
|
||||||
texttospeak = str(result)
|
texttospeak = str(result.stdout)
|
||||||
print(texttospeak)
|
print(texttospeak)
|
||||||
|
|
||||||
# texttospeak = "Welcome to the world of speech synthesis! This is an example of text-to-speech using Piper TTS."
|
# texttospeak = "Welcome to the world of speech synthesis! This is an example of text-to-speech using Piper TTS."
|
||||||
|
|||||||
Reference in New Issue
Block a user