new voice
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s

This commit is contained in:
Song367 2025-07-30 11:20:19 +08:00
parent 0da9a17570
commit e1d4b545d6
3 changed files with 13 additions and 10 deletions

View File

@ -14,9 +14,9 @@ export const config = {
// 音频配置
audio: {
model: 'speech-02-hd',
model: 'speech-01-turbo',
voiceSetting: {
voice_id: 'yantu-qinggang-2',
voice_id: 'tianbing_xinggan_03',
speed: 1,
vol: 1,
pitch: 0,

View File

@ -796,21 +796,24 @@ class WebRTCChat {
async startCall() {
try {
// 添加更详细的错误处理
console.log('开始请求麦克风权限...');
this.localStream = await navigator.mediaDevices.getUserMedia({
video: false,
audio: true
});
console.log('麦克风权限获取成功');
await this.createPeerConnection();
this.startVoiceRecording()
// this.audioProcessor.startRecording()
this.startButton.disabled = true;
this.stopButton.disabled = false;
this.stopButton.disabled = false;
// 显示结束通话按钮
this.stopButton.classList.add('show');
// 显示结束通话按钮
this.stopButton.classList.add('show');
this.updateAudioStatus('已连接', 'connected');
this.updateAudioStatus('已连接', 'connected');
this.logMessage('音频通话已开始', 'success');
// 确保视频映射已加载

View File

@ -13,11 +13,11 @@ export async function playVideoWithAudio(videoPath, text) {
apiKey: minimaxiConfig.apiKey,
groupId: minimaxiConfig.groupId,
body: {
model: 'speech-02-hd',
model: 'speech-01-turbo',
text,
output_format: 'hex', // 流式场景必须使用hex
voice_setting: {
voice_id: 'yantu-qinggang',
voice_id: 'tianbing_xinggan_03',
speed: 1
}
},