Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CharIP-Electron
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
ali
CharIP-Electron
Commits
fead0580
Commit
fead0580
authored
Dec 19, 2023
by
ali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增视频数字人
parent
8a4126f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
HeaderLayout.vue
src/renderer/components/layout/HeaderLayout.vue
+4
-4
ShowVideo.vue
src/renderer/screens/ShowVideo.vue
+1
-1
settings.ts
src/renderer/store/settings.ts
+1
-1
video.ts
src/renderer/store/video.ts
+10
-2
No files found.
src/renderer/components/layout/HeaderLayout.vue
View file @
fead0580
...
...
@@ -10,7 +10,7 @@ const router = useRouter()
const
route
:
any
=
useRoute
()
const
{
settings
}
=
useStore
()
const
setting
=
storeToRefs
(
settings
)
let
vconsole
:
VConsole
|
null
=
null
;
let
vconsole
:
VConsole
|
null
=
null
settings
.
tts
===
'xf_tts'
&&
settings
.
getSource
()
...
...
@@ -31,7 +31,7 @@ function init() {
})
if
(
setting
.
vConsole
.
value
)
{
vconsole
=
new
VConsole
()
;
vconsole
=
new
VConsole
()
}
}
init
()
...
...
@@ -99,9 +99,9 @@ async function changeOpenDevTools() {
async
function
changeOpenVConsole
()
{
if
(
setting
.
vConsole
.
value
)
{
vconsole
=
new
VConsole
()
;
vconsole
=
new
VConsole
()
}
else
if
(
vconsole
)
{
vconsole
.
destroy
()
;
vconsole
.
destroy
()
}
}
...
...
src/renderer/screens/ShowVideo.vue
View file @
fead0580
...
...
@@ -412,7 +412,7 @@ async function runAudioPlay() {
runAudioPlay
()
}
await
audio
.
play
()
loadVideo
(
new
URL
(
'/libai/10.mp4'
,
import
.
meta
.
url
).
href
)
loadVideo
(
role
!
.
playUrl
)
videos
[
1
].
value
!
.
loop
=
true
videos
[
1
].
value
!
.
muted
=
true
...
...
src/renderer/store/settings.ts
View file @
fead0580
...
...
@@ -65,7 +65,7 @@ const useSettingsStore = defineStore('settings', {
llmToTTSSliceLength
:
20
,
voskWsLUrl
:
'ws://127.0.0.1:2700'
,
liveHost
:
'http://122.51.32.12:9000'
,
vConsole
:
true
,
vConsole
:
true
})
as
ISettings
,
getters
:
{},
actions
:
{
...
...
src/renderer/store/video.ts
View file @
fead0580
import
{
defineStore
}
from
'pinia'
type
IVideo
=
{
list
:
{
url
:
string
;
poster
:
string
;
name
:
string
;
qa
:
{
url
:
string
;
q
:
string
;
a
:
string
}[]
}[]
list
:
{
playUrl
:
string
url
:
string
poster
:
string
name
:
string
qa
:
{
url
:
string
;
q
:
string
;
a
:
string
}[]
}[]
}
const
useVideoStore
=
defineStore
(
'video'
,
{
...
...
@@ -13,6 +19,7 @@ const useVideoStore = defineStore('video', {
url
:
new
URL
(
'/libai/wait.mp4'
,
import
.
meta
.
url
).
href
,
poster
:
new
URL
(
'/libai/poster.jpg'
,
import
.
meta
.
url
).
href
,
name
:
'李白'
,
playUrl
:
new
URL
(
'/libai/10.mp4'
,
import
.
meta
.
url
).
href
,
qa
:
[
{
url
:
new
URL
(
'/libai/1.mp4'
,
import
.
meta
.
url
).
href
,
...
...
@@ -69,6 +76,7 @@ const useVideoStore = defineStore('video', {
{
url
:
new
URL
(
'/suhe/wait.mov'
,
import
.
meta
.
url
).
href
,
poster
:
new
URL
(
'/suhe/poster.jpg'
,
import
.
meta
.
url
).
href
,
playUrl
:
new
URL
(
'/suhe/5.mov'
,
import
.
meta
.
url
).
href
,
name
:
'苏荷'
,
qa
:
[
{
...
...
@@ -95,7 +103,7 @@ const useVideoStore = defineStore('video', {
url
:
new
URL
(
'/suhe/5.mov'
,
import
.
meta
.
url
).
href
,
q
:
'怎样才能提高工作效率?'
,
a
:
'提高工作效率的方法包括设置具体目标、规划任务清单、减少干扰、使用时间管理技巧,以及保持工作场所的整洁和组织。'
}
,
}
]
}
]
...
...
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