| Crates.io | fry |
| lib.rs | fry |
| version | 0.0.4 |
| created_at | 2023-10-25 01:40:13.286581+00 |
| updated_at | 2025-08-02 18:45:20.918654+00 |
| description | A dead-simple, no-alloc, no-std TTS. |
| homepage | |
| repository | https://github.com/TTWNO/fry |
| max_upload_size | |
| id | 1012997 |
| size | 1,553,142 |
fryA very simple, dumb, no-alloc, no-std TTS. This comes with a handful of extreme limitation:
espeak to generate the sound files, and sox to modify the output to be of a fixed length.The name is from the term "vocal fry".
If you'd like to produce new files for the library to use (this is required to change the speed of the speech, for example), then you can use the scripts in data to create new files.
Please note that you will have to manually update variables in both the scripts and the library to accomodate any changes made to the data files.
generate_base.shThis script creates new files using espeak and the list of english alphabetic characters to create [a-z].wav
You may modify the arguments to espeak to produce faster sounds via the -s flag for settings "words per minute".
Check out man espeak or man espeak-ng for more details.
calc.pyThis Python file uses the sox command, along with some basic math to calculate the output for adding 0 padding to the WAV file so all files have exactly the same length (in bytes and time).
Then, strip the headers so that the WAV data is simply raw PCM data.
It is up the user what they will do with this data.
If mediainfo displays different information than this for [a-z].wav, then you may need to change the settings in the constants of calc.py to produce the right sized padded/raw files.
fry_normalizefry_normalize is the beginning of a text-to-speech engine written entirely in Rust.
This module only normalizes text to be a restircted, known form.
Check out fry_normalize's README for more information.
.wav files..wav files.
sox (calc.py)python (calc.py)espeak (generate-base.sh)bash (generate-base.sh)std and alloc features for when they are available to the consumer.lib.rs file:
PCM type, because otherwise test output is WAY too big, generic over: