Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Funky Talker

Funky Talker is a small Flask text-to-speech prototype that uses local Piper voice models. Enter text in the web page, choose a voice, submit the form, and the app generates a WAV file that can be played back in the browser.

The app can run either directly with local Python or inside Docker. The Docker image includes Python, Flask, and Piper; the voice models stay outside the image and are mounted into the container at runtime.

Current Features

  • Flask web interface for entering text
  • Voice selection from locally installed Piper .onnx models
  • Browser playback of generated WAV audio
  • Configurable Piper command through PIPER_COMMAND
  • Docker image build and run workflow
  • Local model files kept out of git

Project Structure

funky_talker/
|-- Dockerfile
|-- requirements.txt
|-- funky_talker.py
|-- templates/
|   `-- index.html
|-- static/
|   `-- output.wav        # generated at runtime
|-- models/               # local Piper models, not committed
|-- input.txt             # generated at runtime
|-- .dockerignore
`-- .gitignore

Requirements

For local Python:

  • Python 3
  • Flask
  • Piper text-to-speech
  • One or more Piper voice models

For Docker:

  • Docker Desktop
  • One or more Piper voice models

Voice models are available from:

https://huggingface.co/rhasspy/piper-voices

Voice Models

Voice models are not included in this repository because they are large binary files. Each Piper voice usually has two files:

voice-name.onnx
voice-name.onnx.json

Place both files in the local models/ folder.

The current app expects these model files:

models/en_US-lessac-medium.onnx
models/en_US-lessac-medium.onnx.json

models/en_US-lessac-high.onnx
models/en_US-lessac-high.onnx.json

models/en_GB-northern_english_male-medium.onnx
models/en_GB-northern_english_male-medium.onnx.json

models/en_US-john-medium.onnx
models/en_US-john-medium.onnx.json

models/en_US-kristin-medium.onnx
models/en_US-kristin-medium.onnx.json

To add another voice, download the .onnx and .onnx.json files, place them in models/, then add an entry to the VOICE_MODELS dictionary in funky_talker.py.

Local Python Setup

Create and activate a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

Install dependencies:

pip install -r requirements.txt

If Piper is not on your system PATH, set PIPER_COMMAND before starting the app:

$env:PIPER_COMMAND = "C:\path\to\piper\piper.exe"

Run the app:

python funky_talker.py

Then open:

http://127.0.0.1:5000

Docker Setup

Build the image from the project root:

docker build -t funky-talker .

Run the container and mount the local models/ directory:

docker run --rm -p 5000:5000 -v ${PWD}/models:/app/models funky-talker

Then open:

http://localhost:5000

On Windows PowerShell, ${PWD} should resolve to the current project folder. If Docker has trouble with that path, use the full path instead:

docker run --rm -p 5000:5000 -v D:\personal\code\funky_talker\models:/app/models funky-talker

Generated Files

The app creates a few local runtime files:

  • input.txt
  • static/output.wav

These are generated output and should not be committed.

Portfolio Notes

This project demonstrates:

  • Python application structure
  • Flask request/response handling
  • Template rendering with Jinja
  • Calling a local command-line AI/TTS tool from Python
  • Managing local model assets outside git
  • Docker image creation and container runtime usage

Possible next improvements:

  • Move model definitions into a config file
  • Add character or speaking-style presets
  • Improve the visual design of the web interface
  • Add a compose.yaml for a shorter Docker startup command
  • Add basic error handling when a model file is missing

About

Funky Talker is a small Flask/Piper text-to-speech demo packaged with Docker to demonstrate Python web app structure, local model handling, and containerized deployment basics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages