Skip to content

A research project focused on developing a lightweight neural voice cloning and speech synthesis system, optimized for deployment on edge devices.

Python

Make text preprocessing a required step in the docs

benITo47e413c0d90cbf
diff --git a/README.md b/README.md
index 2b0e4c1..82eb650 100644
--- a/README.md
+++ b/README.md
@@ -51,13 +51,24 @@ voice = tts.preset_voice("pl_male_standard") # tts.preset_voices() lists them a
audio = tts.generate("Dzień dobry! Mówię po polsku.", voice, language="pl")
```
-`TTS.from_pretrained` picks CUDA, Apple's MPS, or the CPU, in that order. Numbers, dates, money, and abbreviations are
-read out as words, and long texts are split at sentence ends, so you can pass text as you'd write it.
+`TTS.from_pretrained` picks CUDA, Apple's MPS, or the CPU, in that order. Long texts are split at sentence ends.
+
+### Text preprocessing
+
+Reverb reads text in spoken form: it was trained on text with numbers, dates, money, units, symbols, and abbreviations
+written out as words. Normalizing the text is therefore a required step before generating, not an optional extra.
+
+- **With the Python package**, it's done for you: `generate` and `voice` run
+ [Verbalis](https://github.com/software-mansion-labs/Verbalis) on the text and the transcript by default, so you can
+ pass text as you'd write it ("$49" is read as "forty-nine dollars").
+- **Anywhere else** (the ExecuTorch programs, ruNNtime, or `prepare=False`), the text reaches the model exactly as you
+ give it. Normalize it yourself first. We strongly recommend Verbalis, the normalizer the package uses, with C++,
+ TypeScript, and Python APIs for all seven of Reverb's languages.
### In the browser
-[ruNNtime](https://docs.swmansion.com/runntime/zoo/getting-started/) runs Reverb on the GPU in the browser through
-WebGPU. Install it with `npm install runntime` and follow its getting-started guide.
+[ruNNtime](https://docs.swmansion.com/runntime/zoo/text-to-speech/) runs Reverb on the GPU in the browser through
+WebGPU. Install it with `npm install runntime` and follow its text-to-speech guide.
## Documentation
diff --git a/docs/reference.md b/docs/reference.md
index 650b1a2..363dd39 100644
--- a/docs/reference.md
+++ b/docs/reference.md
@@ -29,10 +29,13 @@ precision.
| Vulkan int4 | Android GPUs | 233 MB |
| QNN int4 | Qualcomm NPUs, one program per chip: Snapdragon 8 Gen 1 (SM8450, v69), 8 Gen 2 (SM8550, v73), 8 Gen 3 (SM8650, v75), 8 Elite (SM8750, v79), 8 Elite Gen 5 (SM8850, v81) | 232–237 MB each |
+The programs take text exactly as given, so normalize it first, as the package does: we strongly recommend
+[Verbalis](https://github.com/software-mansion-labs/Verbalis), which has a C++ API for on-device apps.
+
### In the browser
-[ruNNtime](https://docs.swmansion.com/runntime/zoo/getting-started/) runs Reverb on the GPU in the browser through
-WebGPU, from its own copy of the weights.
+[ruNNtime](https://docs.swmansion.com/runntime/zoo/text-to-speech/) runs Reverb on the GPU in the browser through
+WebGPU, with the weights from the Hugging Face Hub.
## Repository layout
diff --git a/docs/usage.md b/docs/usage.md
index dd9a857..34acd09 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -92,11 +92,12 @@ audios = tts.generate(["First line.", "Second line."], voice, language="en")
audios = tts.generate(["Hello.", "Bonjour."], [anna, pierre], language=["en", "fr"])
```
-## Text preparation
+## Text preprocessing
-Text and transcripts are prepared with [Verbalis](https://github.com/software-mansion-labs/Verbalis) first: numbers,
-dates, money, units, symbols and abbreviations become words ("$49" becomes "forty-nine dollars"). Pass `prepare=False`
-for text that is already written out, in `generate` or in `voice`.
+Reverb was trained on text in spoken form, so every text and transcript must be normalized before it reaches the model:
+numbers, dates, money, units, symbols, and abbreviations written out as words ("$49" becomes "forty-nine dollars"). The
+package does this with [Verbalis](https://github.com/software-mansion-labs/Verbalis) in `generate` and in `voice`. Pass
+`prepare=False` only for text that is already normalized; if you normalize it yourself, we strongly recommend Verbalis.
## Weights and hardware