diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue index 851668e8..48b0211b 100644 --- a/src/components/touch-btn/touch-btn.vue +++ b/src/components/touch-btn/touch-btn.vue @@ -184,7 +184,7 @@ popupRef.value.open(); startAudioRecord({ onFrame: (pcmData) => { - console.log(pcmData); + console.log(pcmData.length); ws.value.send({ data: ProtocolCodec.pack(MessageType.AUDIO_DATA, pcmData) }); diff --git a/src/uni_modules/ty-recording/utssdk/app-android/index.uts b/src/uni_modules/ty-recording/utssdk/app-android/index.uts index d0268fc4..ea8f462d 100644 --- a/src/uni_modules/ty-recording/utssdk/app-android/index.uts +++ b/src/uni_modules/ty-recording/utssdk/app-android/index.uts @@ -14,7 +14,7 @@ import AtomicBoolean from "java.util.concurrent.atomic.AtomicBoolean"; const isRecording = new AtomicBoolean(false); // 原子布尔值,保证线程安全 // 1. 音频采集参数(极简配置,适配大部分设备) -const sampleRate : Int = 16000; // 采样率 +const sampleRate : Int = 48000; // 采样率 const channelConfig = AudioFormat.CHANNEL_IN_MONO; // 单声道 const audioFormat = AudioFormat.ENCODING_PCM_16BIT; // 16位PCM const minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);