CKermit commited on
Commit
edd6023
·
verified ·
1 Parent(s): 3e56747

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +23 -15
README.md CHANGED
@@ -111,9 +111,9 @@ curl --fail-with-body -X POST http://localhost:8000/v1/audio/speech \
111
  -H 'Content-Type: application/json' \
112
  -d '{
113
  "model": "FireRedTTS3-Instruct",
114
- "input": "Good evening, and welcome to the show.",
115
  "task_type": "VoiceDesign",
116
- "instructions": "A young woman with a gentle voice, speaking slowly.",
117
  "seed": 42
118
  }' --output voice_design.wav
119
  ```
@@ -126,16 +126,25 @@ input, so `input` may be empty; no reference transcript is required:
126
  ```bash
127
  curl --fail-with-body -X POST http://localhost:8000/v1/audio/speech \
128
  -H 'Content-Type: application/json' \
129
- -d '{
130
- "model": "FireRedTTS3-Instruct",
131
- "input": "",
132
- "task_type": "SemanticEdit",
133
- "instructions": "Replace birthday with anniversary.",
134
- "ref_audio": "docs/_static/audio/ref_voice.wav",
135
- "seed": 42
136
- }' --output semantic_edit.wav
 
 
137
  ```
138
 
 
 
 
 
 
 
 
139
  ## Acoustic editing
140
 
141
  Adjust the source recording's speed, pitch, or volume. This example requests
@@ -154,7 +163,8 @@ curl --fail-with-body -X POST http://localhost:8000/v1/audio/speech \
154
  }' --output acoustic_edit.wav
155
  ```
156
 
157
- For pitch or volume, supply the trained instruction template, for example
 
158
  `"instructions": "shift the pitch by 2 steps"` or
159
  `"instructions": "adjust the volume to 0.8"`. An explicit `instructions`
160
  string takes precedence over the composed speed instruction. The `speed`
@@ -204,9 +214,9 @@ async def main() -> None:
204
  result = await client.speech(
205
  GenerateRequest(
206
  prompt={
207
- "input": "Good evening, and welcome to the show.",
208
  "task_type": "VoiceDesign",
209
- "instructions": "A young woman with a gentle voice.",
210
  "seed": 42,
211
  },
212
  stream=False,
@@ -248,8 +258,6 @@ if __name__ == "__main__":
248
  not load the example YAML.
249
  - `temperature`, `top_p`, and `top_k` affect the VoiceDesign/SemanticEdit text
250
  phase. They do not control continuous-latent audio generation.
251
- - SGLang Omni and our standalone inference pipeline can produce different
252
- SemanticEdit outputs. Validate the edits on your own recordings.
253
 
254
  See the [FireRedTTS3 cookbook](https://github.com/sgl-project/sglang-omni/blob/main/docs/cookbook/firered_tts3.md)
255
  for the full request parameters and deployment configuration.
 
111
  -H 'Content-Type: application/json' \
112
  -d '{
113
  "model": "FireRedTTS3-Instruct",
114
+ "input": "今天天气很好,我们一起去公园散步吧。",
115
  "task_type": "VoiceDesign",
116
+ "instructions": "一个年轻女性的温柔嗓音,语速稍慢,带一点俏皮。",
117
  "seed": 42
118
  }' --output voice_design.wav
119
  ```
 
126
  ```bash
127
  curl --fail-with-body -X POST http://localhost:8000/v1/audio/speech \
128
  -H 'Content-Type: application/json' \
129
+ --data-binary @- --output semantic_edit.wav <<'JSON'
130
+ {
131
+ "model": "FireRedTTS3-Instruct",
132
+ "input": "",
133
+ "task_type": "SemanticEdit",
134
+ "instructions": "Replace 'birthday' with 'anniversary'.",
135
+ "ref_audio": "docs/_static/audio/ref_voice.wav",
136
+ "seed": 42
137
+ }
138
+ JSON
139
  ```
140
 
141
+ For substitutions, use the quoted form `Replace 'source' with 'target'.`
142
+ The quoted example above was verified by transcribing the generated audio;
143
+ omitting the quotes did not perform the intended replacement in this test.
144
+ The `x-gen-text` response header contains text with edit masks, so the target
145
+ word may appear only in the audio. Validate the rendered audio rather than
146
+ requiring the target word to appear in that header.
147
+
148
  ## Acoustic editing
149
 
150
  Adjust the source recording's speed, pitch, or volume. This example requests
 
163
  }' --output acoustic_edit.wav
164
  ```
165
 
166
+ Raw acoustic instructions must follow the trained templates rather than
167
+ free-form descriptions. For pitch or volume, use, for example,
168
  `"instructions": "shift the pitch by 2 steps"` or
169
  `"instructions": "adjust the volume to 0.8"`. An explicit `instructions`
170
  string takes precedence over the composed speed instruction. The `speed`
 
214
  result = await client.speech(
215
  GenerateRequest(
216
  prompt={
217
+ "input": "今天天气很好,我们一起去公园散步吧。",
218
  "task_type": "VoiceDesign",
219
+ "instructions": "一个年轻女性的温柔嗓音,语速稍慢,带一点俏皮。",
220
  "seed": 42,
221
  },
222
  stream=False,
 
258
  not load the example YAML.
259
  - `temperature`, `top_p`, and `top_k` affect the VoiceDesign/SemanticEdit text
260
  phase. They do not control continuous-latent audio generation.
 
 
261
 
262
  See the [FireRedTTS3 cookbook](https://github.com/sgl-project/sglang-omni/blob/main/docs/cookbook/firered_tts3.md)
263
  for the full request parameters and deployment configuration.