new voice
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s
This commit is contained in:
parent
0da9a17570
commit
e1d4b545d6
@ -14,9 +14,9 @@ export const config = {
|
|||||||
|
|
||||||
// 音频配置
|
// 音频配置
|
||||||
audio: {
|
audio: {
|
||||||
model: 'speech-02-hd',
|
model: 'speech-01-turbo',
|
||||||
voiceSetting: {
|
voiceSetting: {
|
||||||
voice_id: 'yantu-qinggang-2',
|
voice_id: 'tianbing_xinggan_03',
|
||||||
speed: 1,
|
speed: 1,
|
||||||
vol: 1,
|
vol: 1,
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
|
|||||||
11
src/index.js
11
src/index.js
@ -796,21 +796,24 @@ class WebRTCChat {
|
|||||||
|
|
||||||
async startCall() {
|
async startCall() {
|
||||||
try {
|
try {
|
||||||
|
// 添加更详细的错误处理
|
||||||
|
console.log('开始请求麦克风权限...');
|
||||||
this.localStream = await navigator.mediaDevices.getUserMedia({
|
this.localStream = await navigator.mediaDevices.getUserMedia({
|
||||||
video: false,
|
video: false,
|
||||||
audio: true
|
audio: true
|
||||||
});
|
});
|
||||||
|
console.log('麦克风权限获取成功');
|
||||||
|
|
||||||
await this.createPeerConnection();
|
await this.createPeerConnection();
|
||||||
this.startVoiceRecording()
|
this.startVoiceRecording()
|
||||||
// this.audioProcessor.startRecording()
|
// this.audioProcessor.startRecording()
|
||||||
this.startButton.disabled = true;
|
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');
|
this.logMessage('音频通话已开始', 'success');
|
||||||
|
|
||||||
// 确保视频映射已加载
|
// 确保视频映射已加载
|
||||||
|
|||||||
@ -13,11 +13,11 @@ export async function playVideoWithAudio(videoPath, text) {
|
|||||||
apiKey: minimaxiConfig.apiKey,
|
apiKey: minimaxiConfig.apiKey,
|
||||||
groupId: minimaxiConfig.groupId,
|
groupId: minimaxiConfig.groupId,
|
||||||
body: {
|
body: {
|
||||||
model: 'speech-02-hd',
|
model: 'speech-01-turbo',
|
||||||
text,
|
text,
|
||||||
output_format: 'hex', // 流式场景必须使用hex
|
output_format: 'hex', // 流式场景必须使用hex
|
||||||
voice_setting: {
|
voice_setting: {
|
||||||
voice_id: 'yantu-qinggang',
|
voice_id: 'tianbing_xinggan_03',
|
||||||
speed: 1
|
speed: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user