Hello All!
Im glad and excited to be part of this forum.
Im trying to have Piper - the TTS engine on my windows computer and I decided to take help from GPT (I know it might be the dumbest thing to do, but I know nothing about this stuff and the GPT was easiest way to do it
So, few things GPT got right: It helped me guiding how should I be installing the piper, which files should I download and also helped me to select the voice of my liking and download it.
Next thing was to test it! After few failed attempts on GPT I decided to dig it up on the internet and got it working manually. I was successfully able to create a text file with some content in it and then from PowerShell run command to create an audio file and then also played it from the PowerShell
Next thing was to connect it to the LLM I have installed on my computer already and this is the script GPT came up with, which I fell is wrong:
import subprocess
import os
# Paths
piper = "C:\\Users\\admin\\piper\\piper\\piper.exe"
model = "C:\\Users\\admin\\piper\\piper\\models\\en_US-libritts-high\\libritts-high.onnx"
config = "C:\\Users\\admin\\piper\\piper\\models\\en_US-libritts-high\\config.json"
output = "C:\\Users\\admin\\piper\\piper\\response.wav"
# Delete old file if it exists
if os.path.exists(output):
os.remove(output)
# Run piper with --text directly
result = subprocess.run([
piper,
"--m", model,
"--c", config,
"--text", "This is the final test using the text flag.",
"--f", output
])
# Check result
if os.path.exists(output):
print(" Piper generated the audio!")
subprocess.run(["start", output], shell=True)
else:
print(" Piper still did not create the output.")
So, what Im missing here? I have varied experience in embedded programming but this is something Im doing as a hobby project. And I would love to have your valuable inputs
Thanks and grateful in advance. Looking forward