You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import os
from dotenv import load_dotenv
import time
import speech_recognition as sr
import pyttsx3
from piper.voice import PiperVoice
import numpy as np
import sounddevice as sd
load_dotenv()
model = "/home/jedd/jarvis/en_US-lessac-medium.onnx.json"
voice = PiperVoice(model)
text = "This is an example of text to speech"
wav_file = wave.open(“output.wav”, “w”)
audio = voice.synthesize(text, wav_file)
The text was updated successfully, but these errors were encountered:
When trying to initialize the model, I get the following error message:
Traceback (most recent call last):
File "/home/jedd/jarvis/jv.py", line 19, in
voice = PiperVoice(model)
^^^^^^^^^^^^^^^^^
TypeError: PiperVoice.init() missing 1 required positional argument: 'config'
Raspberry Pi 5 - 8GB
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
Model Files
en_US-lessac-medium.onnx
en_US-lessac-medium.onnx.json
en_US-lessac-medium.onnx.json
The text was updated successfully, but these errors were encountered: