speech
Version, currently main branch1 version
- main branchlatestOct 16, 2025
github.com/kojix2/speech-ui
No description declared in shard.yml.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
speech:
github: kojix2/speech-ui
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.17.1- License
- MIT
- Author
- kojix2
- Target
speechfrom src/speech.cr
Dependencies
Runtime Dependencies
README
Speech - OpenAI Text-to-Speech GUI
A Crystal GUI application using the OpenAI Text-to-Speech API. Enter text, choose voice/model/format, optionally add instructions, then generate and play AI‑generated speech.
Features
- Uses OpenAI GPT-4o-mini-TTS / tts-1 / tts-1-hd models
- 11 built‑in voices selectable
- Multiple audio output formats (mp3, wav, pcm, opus, flac, aac)
- Optional instruction prompt to change tone / style
- Save-to-file option with custom path
- Simple, compact cross‑platform GUI using MPV (libmpv) for playback
Prerequisites
- Crystal language installed
- OpenAI API key (https://platform.openai.com/api-keys)
- MPV (libmpv) runtime installed
Examples to install libmpv:
- Ubuntu/Debian:
sudo apt install mpv libmpv-dev - Fedora:
sudo dnf install mpv mpv-libs - Arch:
sudo pacman -S mpv - macOS (Homebrew):
brew install mpv
Install dependencies
shards install
Build
# Speech - OpenAI TTS GUI
Minimal Crystal GUI for OpenAI Text-to-Speech. Type text, pick voice / model / format, optionally add instructions, then generate & play (or save) audio.
## Highlights
* Models: gpt-4o-mini-tts / tts-1 / tts-1-hd
* Voices (11): alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer
* Formats: mp3 (default), wav, pcm, opus, flac, aac
* Optional instructions & save-to-file
## Quick Start
Prerequisites: Crystal, OpenAI API key, MPV (libmpv) installed.
```bash
shards install
export OPENAI_API_KEY="your-api-key"
shards build --release -Dpreview_mt
bin/speech
Usage
- Select Voice / Model / Format
- (Optional) Enter instructions (e.g. "Warm, calm")
- Enter text
- (Optional) Enable "Save file" and choose a path
- Click "Generate & Play"
Notes
- Playback uses MPV (libmpv). Ensure libmpv is installed and linkable on your system.
- Disclose to users the voice is AI-generated
- API usage may incur cost
- Requires internet
Dev
crystal run src/speech.cr
License
MIT
- uing – GUI toolkit
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Oct 16, 2025
- Crystal
>= 1.17.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/kojix2/speech-ui
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1