Commit 6cc12989 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

chore: 数字人对话剔除语调、粤语音色默认值

See merge request !11
parents b5325f82 f7b3f8cb
......@@ -31,10 +31,13 @@ const timebreId = computed(() => digitalHumanDialogueStore.humanInfo.timebreId)
@click="emit('click', dialogueTimbreItem!.timebreId)"
>
<div
class="h-16 w-16 rounded-lg bg-[url(https://digital-human-js-cdn.cdn.bcebos.com/web_base/20240926112018/digital-human-web-new-base/img/boy.png)] bg-[length:100%_100%]"
></div>
class="h-16 w-16 rounded-lg bg-[length:100%_100%]"
:style="{
backgroundImage: `url(${dialogueTimbreItem?.iconUrl || 'https://digital-human-js-cdn.cdn.bcebos.com/web_base/20240926112018/digital-human-web-new-base/img/boy.png'})`,
}"
/>
<div class="flex-1 overflow-hidden">
<div class="mb-2 flex items-center gap-2">
<div class="mb-3 flex items-center gap-2">
<div class="max-w-32 truncate">{{ dialogueTimbreItem?.name }}</div>
<CustomIcon
class="cursor-pointer text-lg"
......@@ -44,7 +47,9 @@ const timebreId = computed(() => digitalHumanDialogueStore.humanInfo.timebreId)
</div>
<NScrollbar x-scrollable>
<div class="flex gap-2">
<NTag v-for="(style, index) in dialogueTimbreItem?.style" :key="index" type="warning" round>{{ style }}</NTag>
<NTag v-for="(style, index) in dialogueTimbreItem?.style" :key="index" type="warning" round>
{{ style }}
</NTag>
</div>
</NScrollbar>
</div>
......
......@@ -13,6 +13,14 @@ const sexList = [
{ key: 1, label: '男性' },
]
const speedMarks: { [speed: number]: string } = {
3: '0.5x',
4: '0.8x',
5: '1x',
6: '1.3x',
7: '1.5x',
}
const currentSelectedAudioType = ref('mandarin')
const audioTypeList = [
......@@ -38,15 +46,6 @@ const speed = computed({
},
})
const intonation = computed({
get() {
return digitalHumanDialogueStore.humanInfo.intonation
},
set(value) {
digitalHumanDialogueStore.setIntonation(value)
},
})
const isMandarinAudioType = computed(() => {
return currentSelectedAudioType.value === 'mandarin'
})
......@@ -75,7 +74,17 @@ async function getDigitalTimbreList() {
}
function handleUpdateAudioType(audioType: string) {
digitalHumanDialogueStore.humanInfo.timebreId = audioType === 'mandarin' ? '5132' : ''
digitalHumanDialogueStore.humanInfo.timebreId = audioType === 'mandarin' ? '5132' : '101019'
digitalAudioRef.value?.pause()
}
function handleToAudioList() {
showAll.value = true
digitalAudioRef.value?.pause()
}
function handleBack() {
showAll.value = false
digitalAudioRef.value?.pause()
}
......@@ -116,7 +125,7 @@ function handlePlayDigitalAudio(audioUrl: string) {
<DigitalAudioCard
:dialogue-timbre-item="digitalTimbreValue"
:show-toggle="true"
@toggle="showAll = true"
@toggle="handleToAudioList"
@play="handlePlayDigitalAudio"
/>
</div>
......@@ -124,19 +133,14 @@ function handlePlayDigitalAudio(audioUrl: string) {
<div class="mt-4 text-lg">聲音</div>
<div class="mt-4 flex items-center gap-2">
<div class="w-12">語速:</div>
<n-slider v-model:value="speed" class="flex-1" :max="15" :min="0" :step="1" />
<div class="w-10 text-center">{{ speed }}</div>
</div>
<div class="mt-4 flex items-center gap-2">
<div class="w-12">語調:</div>
<n-slider v-model:value="intonation" class="flex-1" :max="15" :min="0" :step="1" />
<div class="w-10 text-center">{{ intonation }}</div>
<n-slider v-model:value="speed" class="flex-1" :max="7" :min="3" :step="1" />
<div class="w-10 text-center">{{ speedMarks[speed] }}</div>
</div>
</NScrollbar>
<div v-else>
<div class="flex items-center gap-4 px-4 pb-3">
<n-button text @click="showAll = false">
<n-button text @click="handleBack">
<template #icon>
<CustomIcon class="text-lg" icon="mingcute:left-line" />
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment