|
|
@@ -790,7 +790,8 @@ export default {
|
|
|
voiceSourceOptions: [
|
|
|
{ label: '阿里云TTS', value: 'aliyun_tts' },
|
|
|
{ label: '豆包语音', value: 'doubao_vcl_tts' },
|
|
|
- { label: '电信语音', value: 'chinatelecom_tts' }
|
|
|
+ { label: '电信语音', value: 'chinatelecom_tts' },
|
|
|
+ { label: '科大讯飞', value: 'xf_tts' }
|
|
|
],
|
|
|
}
|
|
|
},
|
|
|
@@ -869,13 +870,21 @@ export default {
|
|
|
}
|
|
|
this.handleConfigChange()
|
|
|
},
|
|
|
+ /** 根据音色来源过滤音色列表,未选择来源时展示全部 */
|
|
|
+ applyVoiceSourceFilter() {
|
|
|
+ const voiceSource = this.selectedNode && this.selectedNode.nodeConfig
|
|
|
+ ? this.selectedNode.nodeConfig.voiceSource
|
|
|
+ : null
|
|
|
+ if (voiceSource) {
|
|
|
+ this.easyCallVoiceCodeList = this.allEasyCallVoiceCodeList.filter(e => e.voiceSource == voiceSource)
|
|
|
+ } else {
|
|
|
+ this.easyCallVoiceCodeList = this.allEasyCallVoiceCodeList
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 处理配置变化,强制更新视图 */
|
|
|
handleConfigChange(v) {
|
|
|
if( !!v && v === "handleVoiceSource" ){
|
|
|
- let voiceSource = this.selectedNode.nodeConfig.voiceSource;
|
|
|
-
|
|
|
- this.easyCallVoiceCodeList = this.allEasyCallVoiceCodeList.filter(e => e.voiceSource == voiceSource);
|
|
|
-
|
|
|
+ this.applyVoiceSourceFilter()
|
|
|
this.selectedNode.nodeConfig.voiceCode = null;
|
|
|
this.selectedNode.nodeConfig.ttsModels = null;
|
|
|
}
|
|
|
@@ -971,7 +980,7 @@ export default {
|
|
|
})
|
|
|
getVoiceCodeList().then(res => {
|
|
|
this.allEasyCallVoiceCodeList = res.data || []
|
|
|
- this.easyCallVoiceCodeList = res.data || []
|
|
|
+ this.applyVoiceSourceFilter()
|
|
|
})
|
|
|
getBusiGroupList().then(res => {
|
|
|
this.easyCallBusiGroupList = res.data || []
|