fdemelo commited on
Commit
0bc2c03
·
verified ·
1 Parent(s): 63b5138

Re-export styletts2-ljspeech (loom-exporter d965717)

Browse files
Files changed (2) hide show
  1. README.md +20 -5
  2. styletts2-ljspeech.gguf +2 -2
README.md CHANGED
@@ -35,19 +35,34 @@ the HF repo carries no `license:`/`language:` tags; MIT per the upstream GitHub
35
  Run it with [loom-py](https://github.com/loom-ai-org/loom-py) -- `loom-py-rt` on PyPI:
36
 
37
  ```sh
38
- pip install "loom-py-rt[hub]>=1.0.0rc1"
39
  ```
40
 
41
  ```python
42
  import loom
43
 
44
  model = loom.Model.from_pretrained("loom-ai-org/styletts2-ljspeech-loom")
45
- # styletts2-ljspeech takes phoneme ids, not text -- see model.driver_source for the exact driver inputs.
46
- audio = model.infer(tokens=[16, 40, 22, 30, 12, 3], n_steps=4, seed=1234)
 
 
 
 
 
 
 
47
  ```
48
 
49
- `model.driver_source` prints the exact driver script this GGUF embeds, including a header comment
50
- documenting every argument `model.infer()`/`model.generate()` accepts for this model.
 
 
 
 
 
 
 
 
51
 
52
  ## Files
53
 
 
35
  Run it with [loom-py](https://github.com/loom-ai-org/loom-py) -- `loom-py-rt` on PyPI:
36
 
37
  ```sh
38
+ pip install -U "loom-py-rt[hub]"
39
  ```
40
 
41
  ```python
42
  import loom
43
 
44
  model = loom.Model.from_pretrained("loom-ai-org/styletts2-ljspeech-loom")
45
+
46
+ # styletts2-ljspeech is trained on phonemes. Its symbol table ships in the GGUF, so the only piece that is not in
47
+ # the file is grapheme-to-phoneme -- a property of the language rather than of this checkpoint:
48
+ # pip install "loom-py-rt[phonemes]"
49
+ audio = model.text2speech.infer("hello world")
50
+ audio.save("out.wav")
51
+
52
+ # Without that extra, or with your own G2P, pass phonemes instead:
53
+ audio = model.text2speech.infer(phonemes=model.tokenize("həˈloʊ"))
54
  ```
55
 
56
+ ### The layer underneath
57
+
58
+ The call above is the high-level door: one per task, named for the modality pair it maps between, with
59
+ the windowing, sampling and assembly this model needs already applied. Under it, `model.infer(...)`
60
+ passes your arguments straight to the driver this GGUF embeds -- which is where you go for a knob the
61
+ door does not name.
62
+
63
+ `model.driver_source` prints that driver, including a header comment documenting every argument it
64
+ accepts for this model, and is the authority on it. See [loom-py](https://github.com/loom-ai-org/loom-py) for the API and
65
+ [loom.cpp](https://github.com/loom-ai-org/loom.cpp) for what the engine does between the two.
66
 
67
  ## Files
68
 
styletts2-ljspeech.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1ca10410666bd8cca7de7460035c0aa1217eb22f5c08172cae7a1478bef08d03
3
- size 411046112
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a30d5e3d40e9c75aa667aa06042e138f23edd56ce9bc314d58c883d7e553e3a
3
+ size 411048672