Moonshine Klatt on Feathers
The adafruit_moonshine_klatt CircuitPython library has been tested with the following Adafruit Feather boards. Not all Feather boards will work. The processor must have sufficient speed to generate the data and the board must have I2S out.
The following Feathers have been tested to work:
- Feather RP2040
- Feather RP2350 (the 8 MB PSRAM version for PicoTTS)
- Feather ESP32-S3 (4MB Flash, 2MB PSRAM)
Wiring
Wire the Feather to the MAX98357 I2S amplifier as shown on the Feather + MAX98357A Wiring page.
Code
Click the Download Project Bundle button below to download the necessary libraries and the code.py file in a zip file. Extract the contents of the zip file, open the folder that matches your CircuitPython version.
# SPDX-FileCopyrightText: 2026 Mikey Sklar for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# An example using the Adafruit_Moonshine_Klatt library to generate speech using an Adafruit Feather
# boards with an external wired MAX98357A I2S amplifier
import time
import audiobusio
import board
import adafruit_moonshine_klatt as speech
audio = audiobusio.I2SOut(board.A0, board.A1, board.A2)
tts = speech.TTS(audio)
while True:
for voice in tts.voices:
tts.voice = voice
start = time.monotonic()
tts.say(f"Hello from Circuit Python. This is the {voice} voice.")
print(f"{voice}: {time.monotonic() - start:.2f} s")
time.sleep(1)
time.sleep(3)
Upload the Code and Libraries to the Feather
After downloading the Project Bundle, plug your Feather into your computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called CIRCUITPY. Unzip the folder and copy the following items to the Feather's CIRCUITPY drive.
- lib folder
- code.py
Your Feather CIRCUITPY drive should look like this after copying the files and folders:
And this is how it sounds:
The sound for the other two Feathers with the external I2S amplifier sound identical.
Page last edited October 20, 2026