Overview
The Spell Jam app on the Fruit Jam is a twist on a classic electronic toy. Check out the Spell Jam learn guide to learn all about it.
By default, Spell Jam uses the Amazon Polly Text-to-Speech (TTS) service to create audio from the entered text. While Amazon's service can be used for free during a trial period, it does require an AWS account.
If you'd prefer not to create an Amazon AWS account, you can instead run a local TTS server on your home network using open-source models like KittenTTS, Kani-TTS or eSpeak.
This playground will walk you through the steps required to run a local TTS server on your network and configure Spell Jam on your Fruit Jam to use that server instead of AWS.
Installing a Text-to-Speech Model
There are two TTS AI models that the Spell Jam local backend works with:
- KittenTTS - lightweight, will run on a Raspberry Pi 4/5
- Kani-TTS - newer, but may require an Nvidia GPU. (as of 2/2026 Kani no longer works with server.py)
Legacy software TTS application:
- eSpeak - Initially released in 2006, a free and open-source compact speech synthesizer.
Before install any of the TTS systems, create and/or activate a dedicated Python virtual environment.
python3 -m venv venv
source venv/bin/activate
eSpeak
To install the eSpeak software type the following commands:
sudo apt update
sudo apt install espeak
pip install uvicorn scipy fastapi numpy pydantic
KittenTTS
As outlined in the Speech Synthesis On Raspberry Pi with KittenTTS Learn Guide.
- Create and activate a virtaul environment:
mkdir KittenTTS
cd KittenTTS
python3 -m venv venv source venv/bin/activate
2. Install KittenTTS with pip:
pip install https://github.com/KittenML/KittenTTS/releases/download/0.1/kittentts-0.1.0-py3-none-any.whl
The installation will take several minutes depending on your internet connection, and whether you are using a Pi 4 or Pi 5.
3. Install additional dependencies:
pip install uvicorn scipy fastapi numpy pydantic
Kani-TTS
This model has been updated and these instructions are now out of date!
As described in the "setup" instructions from the Kani-TTS GitHub project page.
- Clone the repository:
git clone https://github.com/nineninesix-ai/kani-tts cd kani-tts
2. Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
3. Install dependencies:
pip install -r requirements.txt
Running the Local TTS Server
Once the TTS model has been installed, download the server script (server.py) from
RetiredWizard/Fruit_Jam_Spell_Jam_localTTS.
Then activate your virtual environment and start the server.
source venv/bin/activate python server.py
Your TTS server will now be running on port 8000.
If you have multiple TTS solutions installed, you can force the server to use one of the three supported options by adding one of the model names (kitten, espeak or kani) on the python server.py [model]command line.
NOTE: If your server is running a local firewall, you may need to add a firewall rule to allow TCP traffic to port 8000 from devices on your local network!!!
ufw on linux for example:
sudo ufw allow from 192.168.0.0/16 to any port 8000 proto tcp
Configuring Spell Jam to use the local server
There are three steps to configuring Spell Jam to use a local TTS server:
1. Copy the local TTS file
Download tts_local.py from RetiredWizard/Fruit_Jam_Spell_Jam_localTTS and place it in:
CIRCUITPY/apps/Fruit_Jam_Spell_jam on your Fruit Jam
2. Edit the Spell Jam application code
Open CIRCUITPY/apps/Fruit_Jam_Spell_Jam/code.py,
comment out the AWS line and uncomment the local TTS line:
# from tts_aws import WordFetcherTTS from tts_local import WordFetcherTTS
3. Update the configuration file
Edit launcher.conf.json on your Fruit Jam to include the TTS server endpoint:
{
"spell_jam": {
"tts_server_endpoint": "http://raspberrypi.local:8000",
},
}
Replace raspberrypi.local with your actual hostname or IP address running server.py.
Now that your Fruit Jam is talking to you, a fun word to try is supercalifragilisticexpialidocious or antidisestablishmentarianism.
This page (Your own TTS engine for the Fruit Jam Spell Jam app) was last updated on February 01, 2026.