First Commit

PocketSphinx Just Barely works to recoginze 'Jade' as the wake word
Using https://github.com/suno-ai/bark for the TTS part of the code
This commit is contained in:
Dani
2023-05-08 23:07:33 -04:00
commit 473da1b4ec
6 changed files with 236 additions and 0 deletions

14
voice.py Normal file
View File

@ -0,0 +1,14 @@
import sounddevice as sd
import numpy as np
from bark import generate_audio, SAMPLE_RATE, preload_models
preload_models()
def say(text):
audio_array = generate_audio(text, history_prompt="v2/en_speaker_9")
audio_array = np.expand_dims(audio_array, axis=1)
stream = sd.OutputStream(samplerate=SAMPLE_RATE, channels=1)
stream.start()
stream.write(audio_array)
stream.stop()
stream.close()