Views
No views yet
OpenVoiceOS/pipertts_en-GB_miro. Weights are unmodified; this repo packages the same parameters into
loom.cpp's GGUF format.enlicense: tag; check https://huggingface.co/OpenVoiceOS/pipertts_en-GB_miro directly before redistributingloom-py-rt on PyPI:pip install -U "loom-py-rt[hub,phonemes]"phonemes as in the example below.1import loom
2
3model = loom.Model.from_pretrained("loom-ai-org/vits-piper-en-gb-miro-loom")
4
5# vits-piper-en-gb-miro is trained on phonemes. Its symbol table ships in the GGUF, so the only piece that is not in
6# the file is grapheme-to-phoneme -- a property of the language rather than of this checkpoint, which
7# is why it is the `phonemes` extra above rather than part of the model.
8
9# THE FULL-QUALITY PATH: phonemes you produced yourself, with whatever G2P you trust. The symbol table
10# in the GGUF is what encodes them, so anything that emits IPA works.
11audio = model.text2speech.infer(phonemes="həˈloʊ wˈɜːld", sample_rate=22050)
12audio.save("out.wav")
13
14# THE BUILT-IN PATH: text straight in, phonemized by the bundled rule-based G2P. Good enough for
15# shallow orthographies; for English see the note above, and give it a lexicon so it has stress and
16# real vowels to work with -- "time" is /tɪm/ without one.
17#
18# open-dict-data/ipa-dict (MIT) publishes ~65k-entry wordlists WITH stress for en_UK and en_US, in
19# almost the right shape: its IPA is wrapped in slashes and a rare entry carries two comma-separated
20# variants, both of which the loader rejects. One line converts a downloaded data/en_UK.txt:
21# sed 's:/::g; s/\t\([^,]*\),.*/\t\1/' en_UK.txt > en_UK.tsv
22loom.phonemizers.set_lexicon("en_UK.tsv") # a path, an http(s):// URL, or hf://<repo>/<path>
23
24# sample_rate=22050: this checkpoint does not carry its own rate, so it is a value you have to
25# know from the model's documentation and pass. It is used only if the GGUF declares none; a wrong rate
26# does not fail, it plays the voice at the wrong speed.
27audio = model.text2speech.infer("hello world", sample_rate=22050)
28audio.save("out.wav")model.infer(...)
passes your arguments straight to the driver this GGUF embeds -- which is where you go for a knob the
door does not name.model.driver_source prints that driver, including a header comment documenting every argument it
accepts for this model, and is the authority on it. See loom-py for the API and
loom.cpp for what the engine does between the two.vits-piper-en-gb-miro.gguf -- the model, exported with loom-exporter.