@@ -486,7 +486,7 @@ def __init__(self, module_msg):
486
486
487
487
def setup (
488
488
self ,
489
- model = "melotts_zh -cn" ,
489
+ model = "melotts-zh -cn" ,
490
490
response_format = "sys.pcm" ,
491
491
input = "tts.utf-8.stream" ,
492
492
enoutput = False ,
@@ -903,6 +903,8 @@ def llm_setup(
903
903
if self .version == "v1.0" :
904
904
enkws = True
905
905
else :
906
+ if isinstance (input , str ):
907
+ input = [input ]
906
908
input .append (enkws )
907
909
else :
908
910
enkws = bool (enkws )
@@ -979,6 +981,8 @@ def tts_setup(
979
981
if self .version == "v1.0" :
980
982
enkws = True
981
983
else :
984
+ if isinstance (input , str ):
985
+ input = [input ]
982
986
input .append (enkws )
983
987
else :
984
988
enkws = bool (enkws )
@@ -995,19 +999,23 @@ def tts_inference(self, work_id, input_data, timeout=0, request_id="tts_inferenc
995
999
def melotts_setup (
996
1000
self ,
997
1001
language = "en_US" ,
998
- model = "melotts_zh-cn " ,
1002
+ model = "melotts-en-default " ,
999
1003
response_format = "sys.pcm" ,
1000
1004
input = None ,
1001
1005
enoutput = False ,
1002
1006
enkws = None ,
1003
1007
request_id = "tts_setup" ,
1004
1008
) -> str :
1005
1009
if language == "zh_CN" :
1006
- model = "melotts_zh-cn"
1010
+ model = "melotts-zh-cn"
1011
+ if language == "ja_JP" :
1012
+ model = "melotts-ja-jp"
1007
1013
if input is None :
1008
1014
input = ["tts.utf-8.stream" ]
1009
1015
1010
1016
if enkws :
1017
+ if isinstance (input , str ):
1018
+ input = [input ]
1011
1019
input .append (enkws )
1012
1020
1013
1021
self .latest_melotts_work_id = self .melotts .setup (
@@ -1058,6 +1066,8 @@ def asr_setup(
1058
1066
if self .version == "v1.0" :
1059
1067
enkws = True
1060
1068
else :
1069
+ if isinstance (input , str ):
1070
+ input = [input ]
1061
1071
input .append (enkws )
1062
1072
else :
1063
1073
enkws = bool (enkws )
@@ -1079,6 +1089,8 @@ def vad_setup(
1079
1089
if input is None :
1080
1090
input = ["sys.pcm" ]
1081
1091
if enkws :
1092
+ if isinstance (input , str ):
1093
+ input = [input ]
1082
1094
input .append (enkws )
1083
1095
self .latest_vad_work_id = self .vad .setup (
1084
1096
model , response_format , input , enoutput , request_id
@@ -1099,8 +1111,12 @@ def whisper_setup(
1099
1111
if input is None :
1100
1112
input = ["sys.pcm" ]
1101
1113
if enkws :
1114
+ if isinstance (input , str ):
1115
+ input = [input ]
1102
1116
input .append (enkws )
1103
1117
if envad :
1118
+ if isinstance (input , str ):
1119
+ input = [input ]
1104
1120
input .append (envad )
1105
1121
self .latest_whisper_work_id = self .whisper .setup (
1106
1122
model , response_format , input , enoutput , language , request_id
0 commit comments