Skip to content

stro/text2flac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text2flac

A standalone desktop application for text-to-speech synthesis with WAV/FLAC export. Uses native OS speech capabilities (macOS say, Windows SAPI).

Mac OS screenshot

Features

  • Text input — enter any text to synthesize
  • Language selection — filtered from available system voices
  • Voice selection — pick any installed voice
  • Speed control — 0.25x to 3.0x
  • Pitch control — -10 to +10
  • Preview — play through speakers before exporting
  • Export — save as WAV or FLAC

Build

Requires Go 1.21+ and platform-specific dependencies for Fyne:

macOS

# Install Xcode command-line tools if not already present
xcode-select --install

go build -o builds/text2flac .

Windows

Use tds-gcc as compiler for CGO. MinGW has some issues with fyne compilation.

go build -ldflags="-H windowsgui" -o builds/text2flac.exe .

Linux

# Install TTS dependencies (choose one):
# Ubuntu/Debian:
sudo apt-get install golang libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev espeak festival libxxf86vm-dev

# Fedora/RHEL/CentOS:
sudo dnf install golang libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel espeak festival libXxf86vm-devel

# Arch Linux:
sudo pacman -S golang libxcursor libxrandr libxinerama libxi espeak festival libxxf86vm

# Build the application
go build -o builds/text2flac .

Run

./text2flac        # macOS/Linux
text2flac.exe      # Windows

Cross-platform notes

Feature macOS Windows Linux
TTS engine say command SAPI via System.Speech.Synthesis espeak/festival
Voice listing say -v ? PowerShell + SAPI espeak --voices
WAV output Native (say --file-format=WAVE) Native (SetOutputToWaveFile) Native (espeak -w)
FLAC output WAV → FLAC conversion in Go WAV → FLAC conversion in Go WAV → FLAC conversion in Go
Pitch control Embedded speech commands SSML prosody espeak pitch parameter

License AKA You cannot sell it

This project is released under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License. What it means to you in just four words?

You cannot sell it

You can share and adapt it freely. I cannot revoke these freedoms as long as you follow the license terms, specifically:

  • Attribution - you must give appropriate credit
  • Non-Commercial - you cannot profit from it
  • ShareAlike - if you change something, you must use the same license terms

Full license text can be found at https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode

Copyright (c) 2026 sttek.com

About

A standalone desktop application for text-to-speech synthesis with WAV/FLAC export.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages