TeraSpace commited on
Commit
f2fe7cd
·
verified ·
1 Parent(s): 9043c50

Replace voice styles with clean-25s style_flacs speakers

Browse files
README.md CHANGED
@@ -40,8 +40,8 @@ tts = AutoModel.from_pretrained(
40
  )
41
 
42
  waveform = tts.generate_speech(
43
- "<en>Hello from TeraTTS.</en>",
44
- voice="en_female",
45
  duration_scale=1,
46
  )
47
  tts.save_wav("teratts.wav", waveform)
@@ -54,7 +54,7 @@ standard signed-16-bit PCM WAV without an extra audio package.
54
 
55
  | Control | Values | Effect |
56
  | --- | --- | --- |
57
- | `voice` | `en_female`, `en_male`, `ru_female`, `ru_male`, `mita`, `masha_ls` | Selects a bundled precomputed voice style. |
58
  | `duration_scale` | Positive float, default `1` | Higher values produce slower, longer speech. |
59
  | `diffusion_model` | `distilled` (default), `teacher` | Distilled is faster; teacher supports adjustable CFG. |
60
  | `ruaccent_mode` | `full` (default), `dictionary` | Full uses RUAccent neural ONNX graphs plus dictionaries; dictionary mode loads dictionaries only. |
@@ -83,7 +83,7 @@ expanded to words in the matching language before synthesis:
83
  ```python
84
  waveform = tts.generate_speech(
85
  "<ru>У меня 21 яблоко.</ru> <en>I have 42 apples.</en>",
86
- voice="ru_female",
87
  duration_scale=1,
88
  )
89
  ```
@@ -112,7 +112,7 @@ automatic Russian stress processing entirely.
112
  ```python
113
  for chunk in tts.generate_speech_stream(
114
  "<en>Streaming speech is ready.</en>",
115
- voice="en_female",
116
  duration_scale=1,
117
  ):
118
  # Send float32 mono chunks (44,100 Hz) to a player or network client.
 
40
  )
41
 
42
  waveform = tts.generate_speech(
43
+ "<ru>Привет от TeraTTS.</ru>",
44
+ voice="ru_f1",
45
  duration_scale=1,
46
  )
47
  tts.save_wav("teratts.wav", waveform)
 
54
 
55
  | Control | Values | Effect |
56
  | --- | --- | --- |
57
+ | `voice` | `ru_f1`, `ru_f2`, `ru_m1`, `ru_m5`, `eng_f3`, `eng_f4_whisper`, `eng_f5`, `eng_m2_whisper`, `eng_m3`, `eng_m4` | Selects a bundled precomputed voice style named after its reference audio. |
58
  | `duration_scale` | Positive float, default `1` | Higher values produce slower, longer speech. |
59
  | `diffusion_model` | `distilled` (default), `teacher` | Distilled is faster; teacher supports adjustable CFG. |
60
  | `ruaccent_mode` | `full` (default), `dictionary` | Full uses RUAccent neural ONNX graphs plus dictionaries; dictionary mode loads dictionaries only. |
 
83
  ```python
84
  waveform = tts.generate_speech(
85
  "<ru>У меня 21 яблоко.</ru> <en>I have 42 apples.</en>",
86
+ voice="ru_f1",
87
  duration_scale=1,
88
  )
89
  ```
 
112
  ```python
113
  for chunk in tts.generate_speech_stream(
114
  "<en>Streaming speech is ready.</en>",
115
+ voice="eng_f3",
116
  duration_scale=1,
117
  ):
118
  # Send float32 mono chunks (44,100 Hz) to a player or network client.
config.json CHANGED
@@ -5,6 +5,8 @@
5
  "AutoModel": "modeling_teratts.TeraTTSModel"
6
  },
7
  "default_diffusion_model": "distilled",
 
8
  "model_type": "teratts_onnx",
9
- "sample_rate": 44100
 
10
  }
 
5
  "AutoModel": "modeling_teratts.TeraTTSModel"
6
  },
7
  "default_diffusion_model": "distilled",
8
+ "default_voice": "ru_f1",
9
  "model_type": "teratts_onnx",
10
+ "sample_rate": 44100,
11
+ "voices": ["eng_f3", "eng_f4_whisper", "eng_f5", "eng_m2_whisper", "eng_m3", "eng_m4", "ru_f1", "ru_f2", "ru_m1", "ru_m5"]
12
  }
configuration_teratts.py CHANGED
@@ -10,8 +10,12 @@ class TeraTTSConfig(PretrainedConfig):
10
  self,
11
  sample_rate: int = 44_100,
12
  default_diffusion_model: str = "distilled",
 
 
13
  **kwargs,
14
  ) -> None:
15
  super().__init__(**kwargs)
16
  self.sample_rate = sample_rate
17
  self.default_diffusion_model = default_diffusion_model
 
 
 
10
  self,
11
  sample_rate: int = 44_100,
12
  default_diffusion_model: str = "distilled",
13
+ default_voice: str = "ru_f1",
14
+ voices: list[str] | None = None,
15
  **kwargs,
16
  ) -> None:
17
  super().__init__(**kwargs)
18
  self.sample_rate = sample_rate
19
  self.default_diffusion_model = default_diffusion_model
20
+ self.default_voice = default_voice
21
+ self.voices = voices or []
styles/{en_female → eng_f3}/style_dp.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e99de1badbe70e56da671d2c27dccbfc2caeeb0fd71e80f9532df1811b8fcf40
3
  size 640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8471b25d2db5281feebc6e03af5bfb413c647368d75cdd8cebc44be36def7948
3
  size 640
styles/{masha_ls → eng_f3}/style_ttl.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f5c1d3f7644d1250355400950fca234ddf3867c3fd8fc24bc6e153f81a3bf317
3
  size 51328
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95fdfe490f5b3d3cf699495309177c405a38a89707bc9c711f93dc083fe099b6
3
  size 51328
styles/{ru_female → eng_f4_whisper}/style_dp.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:477b15db0dc2c5b2ab7794ffc1a8c6c6ae2e0881cc6865fb0da74de63445de96
3
  size 640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47031c5fbbea490cba67cfd82f1ffc8ee8ed64c68aa68260f13746c2174ffbfa
3
  size 640
styles/{en_female → eng_f4_whisper}/style_ttl.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:75d859b839a1cdb8e3204032b34719b63b7746da552f45d867d2eb72dd632067
3
  size 51328
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae4a81c2459e4fccb6206b37c3bba518ac3e23fc91344b07516c5e6125257d59
3
  size 51328
styles/{en_male → eng_f5}/style_dp.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:87e6b87cfe57922b868096b7b4cecb87003cc096b177dbd6034c400ae8e437e6
3
  size 640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9629dce9db38b4ab5163429c1eeb9a5771786e58e98e343ea6251bf93a9dfd60
3
  size 640
styles/{mita → eng_f5}/style_ttl.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bafbfbe93efe2e4a87e2365282e13fbab7ab6faaccea61e8d8258488f57435f6
3
  size 51328
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4cc8b6d271d6ee587b13af7bef8f0151821b24d6af546a1167fa885bd962496
3
  size 51328
styles/{ru_male → eng_m2_whisper}/style_dp.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f7bb78f77d4e88027e363b6d97402f0e493c4fd51b1aeb109371c4bab68ffe6
3
  size 640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a2814cc92643cc102d438d0a70742bacbd01921a78cc0ff39b722ab78b2682c
3
  size 640
styles/{en_male → eng_m2_whisper}/style_ttl.npy RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:47efa51c3059b0eb5fd2a32f9dad1f7580808a1c95ff4d8bbd6c1b71fbf7244c
3
  size 51328
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e651551d547ca305256bc56062df24c2706308ffccfc5b8ad9735f057975f270
3
  size 51328
styles/eng_m3/style_dp.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbcc78e880d2e7c6a45f4bff464ee90c9ba17a2599c9d3cc3dea2c0abcb94524
3
+ size 640
styles/eng_m3/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0ffd38329830d1556e1096d396c2a807626b9308eb12af84ea4733c712d8d01
3
+ size 51328
styles/eng_m4/style_dp.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:526724e17a6d0d917c18db0bac6ac97af15ae63312375129ef294462fbbfc0a2
3
+ size 640
styles/eng_m4/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8d5016c1aade83d2bdec1e3aa86d0e421ff9e2fb7a781637e64f8a0d8ef663e
3
+ size 51328
styles/{mita → ru_f1}/style_dp.npy RENAMED
File without changes
styles/ru_f1/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:489cb6d10f3e2528d7ac4b3e4d8b01ca54d44b98d193dd26684b16c3a24bd9a7
3
+ size 51328
styles/{masha_ls → ru_f2}/style_dp.npy RENAMED
File without changes
styles/ru_f2/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4947fa632443f8ad8343399ac258f67f1e85e9594cf5d42ef7e18d6f6fa3e763
3
+ size 51328
styles/ru_female/style_ttl.npy DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f698b258230d56cce4bc344ff75ac789161dc25393cc6c44b82b119b9b7e9c5
3
- size 51328
 
 
 
 
styles/ru_m1/style_dp.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bbdbe5044f5682152b1fe399f7681424870e03023e857b9706863a6d73bf9e9
3
+ size 640
styles/ru_m1/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a49356abab63262e3183518eacadd9e073681f87b8bfd86f7b5aed0317fbd0c
3
+ size 51328
styles/ru_m5/style_dp.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79741747bb75e0dac2357c089bc923926c4a34fe46b5ce9f85376b14b8e59bf9
3
+ size 640
styles/ru_m5/style_ttl.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6eccc64350dcc23a8e790eebd7abbec24b0055e6451d975deffa899885e26e99
3
+ size 51328
styles/ru_male/style_ttl.npy DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:fb75241f50286775de651047da65f9a074f465c5336e26ada43626d15fe82581
3
- size 51328