Repository navigation
feat: add tiny-voca, a 4.5M-parameter English TTS model with its own phonemizer - #1311
Merged
Merged
Conversation
English text to phonemes for the tiny-voca model: a port of the Python package dizione (https://github.com/n4ze3m/dizione) at commit 8cd889e. It lives in src/community_models/tiny_voca/dizione, uses the C++ standard library only and includes no audio.cpp code. For the same data files it gives the same phoneme ids as Python. tests/community_models/tiny_voca/reference.py writes what Python gives and dizione_probe compares the C++ code with it. The dictionary is kept as the text of its file with an index of four bytes a word, so its 125,000 words take 4 MB.
A 4.5M-parameter English text-to-speech model with two voices (https://huggingface.co/n4ze3m/tiny-voca), as the community family tiny_voca with model spec v1. The three transformer stacks are ggml graphs built from framework modules (linear, layer norm, GELU, RoPE, scaled dot-product attention, depthwise convolution). The duration predictor, the frame expansion, the pitch rules and the source-filter waveform head run on the host; the head uses the framework's real FFT. Text goes through the framework chunker and then sentence by sentence through dizione. Memory is kept low: attention scores are worked out for blocks of rows (4 MB at most), graphs are made for each sentence and freed after it, and the waveform head works through the audio in blocks. A session stays near 50 MB however many requests it serves. tools/community_models/convert_tiny_voca.py packs the released files into one GGUF. tiny_voca_synth_probe and reference_audio.py compare the audio with the PyTorch model for the same phoneme ids and noise. tiny_voca_unit_test covers the parts that need no model files.
docs/models/tiny_voca.md describes the model, its options, how it was checked against PyTorch, and its speed and memory. README.md, docs/tts.md and docs/model_licenses.md get their rows, and the path tests get a case with three long-form requests in one session.
Owner
|
@n4ze3m Thanks for the PR! No major issues found during my tests on CUDA/Vulkan/Metal. Two things could be addressed in follow-up PRs:
|
Contributor
Author
|
Thanks for the quick review and for testing on CUDA, Vulkan and Metal! I'll send a follow-up PR for both: a bounded session-owned graph cache, and rejecting languages other than English. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tiny-voca as the community family
tiny_voca, as discussed in #1296. It is an English text-to-speech model with 4.5 million parameters and two voices. It makes 24 kHz audio and is meant for the CPU.What is in it
LinearModule,LayerNormModule,GeluModule,RoPEModule,ScaledDotProductAttentionModule,DepthwiseConv1dModule).src/community_models/tiny_voca/dizione). No other text frontend is used.Try it
The model file is hosted at
gguf/tiny-voca-orig.ggufin n4ze3m/tiny-voca: 23.6 MB, sha2566940a20162d7e6a31141ad42aaa552b4fdb5182edeff9402e5ffaf66adfd72a0.tools/community_models/convert_tiny_voca.pymakes the same bytes from the released checkpoint.Tests
Linux x86-64, CPU backend, FP32.
cteston a full Debug build, gcc 13 and clang 18Limits
More numbers are in
docs/models/tiny_voca.md, and the tools that repeat the comparisons are intests/community_models/tiny_voca.