This commit is contained in:
fengchuanhn@gmail.com
2026-05-18 14:12:57 +08:00
parent 6cc305f5e8
commit 4771397301
7 changed files with 292 additions and 27 deletions

View File

@@ -17,6 +17,10 @@ import {
} from "../config/videoPipeline.js";
import { getVoiceDisplayLabel } from "../utils/voiceLabel.js";
import {
executeGenerateSpeech,
selectAudioHistory,
} from "../services/voiceGenerate.js";
@@ -153,6 +157,17 @@ export const useWorkflowStore = defineStore("workflow", {
avatarSelect: null,
speechGenerating: false,
generatedAudioPath: "",
generatedAudioSrc: "",
currentAudioId: null,
/** @type {Array<{ id: string, label: string, audioPath: string, audioSrc: string, createdAt: number }>} */
audioHistory: [],
// 03 视频编辑
@@ -430,6 +445,18 @@ export const useWorkflowStore = defineStore("workflow", {
},
async generateSpeech() {
return executeGenerateSpeech(this);
},
pickAudioHistory(audioId) {
selectAudioHistory(this, audioId);
},
resetAll() {
this.$reset();