Skip to content

Commit 044d45f

Browse files
grorge123hydai
authored andcommitted
[Example] ChatTTS: add demo wav
1 parent 7157f8f commit 044d45f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

wasmedge-chatTTS/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
asset
2-
config
3-
*.wav
2+
config

wasmedge-chatTTS/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,6 @@ let config_data = serde_json::to_string(&json!({"prompt": "[oral_2][laugh_0][bre
5757
.unwrap()
5858
.as_bytes()
5959
.to_vec();
60-
```
60+
```
61+
62+
And it is the [Demo speaker](./assets/demo.wav).

wasmedge-chatTTS/assets/demo.wav

319 KB
Binary file not shown.

wasmedge-chatTTS/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn get_data_from_context(context: &GraphExecutionContext, index: usize, limit: u
1515
}
1616

1717
fn main() {
18-
let prompt = "It is [uv_break] test sentence [laugh] for chat T T S";
18+
let prompt = "It is test sentence [uv_break] for chat T T S.";
1919
let tensor_data = prompt.as_bytes().to_vec();
2020
let config_data = serde_json::to_string(&json!({"prompt": "[oral_2][laugh_0][break_6]", "spk_emb": "random", "temperature": 0.5, "top_k": 0, "top_p": 0.9}))
2121
.unwrap()
@@ -37,7 +37,6 @@ fn main() {
3737
context.compute().expect("Failed to compute");
3838
let bytes_written = get_data_from_context(&context, 1, 4);
3939
let bytes_written = usize::from_le_bytes(bytes_written.as_slice().try_into().unwrap());
40-
println!("Byte: {}", bytes_written);
4140
let output_bytes = get_data_from_context(&context, 0, bytes_written);
4241
let spec = hound::WavSpec {
4342
channels: 1,

0 commit comments

Comments
 (0)