From 7fe336cf395e7c6a88d58e5d84b0fb242b0f93de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Sat, 28 Feb 2026 09:07:23 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5F=E5=90=88=E5=B9=B6IOS=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/touch-btn/touch-btn.vue | 2 +- src/uni_modules/ty-recording/utssdk/app-android/index.uts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);