guoyu/fronted_uniapp/config/voice-config.js

29 lines
814 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 语音功能配置
* 根据设备兼容性情况调整
*/
export default {
// 是否启用录音功能如果设备录音不正常设为false
enableRecording: false, // ← 改为false禁用录音改为true启用录音
// 录音API类型'uni' 或 'plus'
// uni: 使用uni.getRecorderManager()(标准但可能不稳定)
// plus: 使用plus.audio.getRecorder()原生但需要APP环境
recorderType: 'plus',
// 当录音功能禁用时的提示信息
recordingDisabledMessage: '当前设备不支持录音功能,请使用文字输入',
// 是否在录音失败时自动切换到文字输入
autoSwitchToTextInput: true,
// 录音配置
recordConfig: {
format: 'wav',
sampleRate: 8000,
numberOfChannels: 1,
duration: 60000
}
}