mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 08:33:53 +08:00
fix: 克隆音色未显示
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('voiceClone.languages')" prop="languages"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column :label="$t('voiceClone.trainStatus')" prop="trainStatus" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="status-button" :class="getStatusButtonClass(scope.row)">
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
align="center"></el-table-column>
|
||||
<el-table-column :label="$t('voiceClone.platformName')" prop="modelName"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column :label="$t('voiceClone.languages')" prop="languages"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column :label="$t('voiceClone.trainStatus')" prop="trainStatus" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ getTrainStatusText(scope.row) }}
|
||||
@@ -122,7 +124,8 @@ export default {
|
||||
voiceCloneForm: {
|
||||
modelId: "",
|
||||
voiceIds: [],
|
||||
userId: null
|
||||
userId: null,
|
||||
languages: ""
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -198,7 +201,8 @@ export default {
|
||||
this.voiceCloneForm = {
|
||||
modelId: "",
|
||||
voiceIds: [],
|
||||
userId: null
|
||||
userId: null,
|
||||
languages: ""
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.voiceCloneForm) {
|
||||
|
||||
@@ -753,7 +753,10 @@ export default {
|
||||
|
||||
// 根据选中的语言筛选音色
|
||||
const filteredVoices = allVoices.filter(voice => {
|
||||
if (!voice.languages) return false;
|
||||
if (!voice.languages) {
|
||||
// 对于没有语言信息的克隆音色,始终显示
|
||||
return Boolean(voice.isClone);
|
||||
}
|
||||
const languagesArray = voice.languages.split(/[、;;,,]/).map(lang => lang.trim()).filter(lang => lang);
|
||||
return languagesArray.includes(this.selectedLanguage);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user