API Reference
adafruit_moonshine_klatt
Text to speech for CircuitPython using the Moonshine Klatt formant synthesizer.
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- class adafruit_moonshine_klatt.TTS(audio)
Speak text through an audio output.
- Parameters:
audio – An audio output object with
play(),stop()andplaying, such asaudiobusio.I2SOut,audioio.AudioOutoraudiopwmio.PWMAudioOut. The library creates its ownaudiomixer.Mixeron it. Or anaudiomixer.MixerVoicefrom the caller’s mixer, whose sample rate must matchsample_rate.
- deinit() None
Stop speaking and release the mixer this object created. The audio output and a caller’s mixer are not deinitialized; the caller owns them.
- say(text: str, *, wait: bool = True, interrupt: bool = False) None
Speak
text. If speech is already playing,textis queued after it.