bufe commited on
Commit
0598de9
·
verified ·
1 Parent(s): 07348b2

Update main.ts

Browse files
Files changed (1) hide show
  1. main.ts +11 -5
main.ts CHANGED
@@ -23,19 +23,25 @@ async function synthesizeSpeech(model: string, voice: string, text: string) {
23
  if (model.includes("tts")) {
24
  switch (voice) {
25
  case "alloy":
26
- voiceName = "zh-CN-XiaoyiNeural";
27
  break;
28
  case "echo":
29
- voiceName = "zh-CN-XiaoxiaoNeural";
30
  break;
31
  case "fable":
32
- voiceName = "zh-CN-YunxiaNeural";
33
  break;
34
  case "onyx":
35
- voiceName = "zh-CN-YunyangNeural";
 
 
 
36
  break;
 
 
 
37
  default:
38
- voiceName = "zh-CN-XiaoyiNeural";
39
  break;
40
  }
41
  } else {
 
23
  if (model.includes("tts")) {
24
  switch (voice) {
25
  case "alloy":
26
+ voiceName = "zh-CN-XiaoxiaoNeural";
27
  break;
28
  case "echo":
29
+ voiceName = "zh-CN-XiaoyiNeural";
30
  break;
31
  case "fable":
32
+ voiceName = "zh-CN-YunjianNeural";
33
  break;
34
  case "onyx":
35
+ voiceName = "zh-CN-YunxiNeural";
36
+ break;
37
+ case "nova":
38
+ voiceName = "zh-CN-YunxiaNeural";
39
  break;
40
+ case "shimmer":
41
+ voiceName = "zh-CN-YunyangNeural";
42
+ break;
43
  default:
44
+ voiceName = "zh-TW-HsiaoChenNeural";
45
  break;
46
  }
47
  } else {