Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
digitalPerson-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
digitalPerson
digitalPerson-fe
Commits
6cc12989
Commit
6cc12989
authored
Sep 30, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
chore: 数字人对话剔除语调、粤语音色默认值 See merge request
!11
parents
b5325f82
f7b3f8cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
digital-audio-card.vue
...dialogue-detail/components/digital/digital-audio-card.vue
+9
-4
digital-audio.vue
...iews/dialogue-detail/components/digital/digital-audio.vue
+23
-19
No files found.
src/views/dialogue-detail/components/digital/digital-audio-card.vue
View file @
6cc12989
...
...
@@ -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>
...
...
src/views/dialogue-detail/components/digital/digital-audio.vue
View file @
6cc12989
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment