From da8182443cdeb4f29f8a08ed610e973ee2c8d8c8 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 25 Aug 2026 21:30:09 +0300 Subject: [PATCH] =?UTF-8?q?stt(phone):=20SttDebug=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D0=B5=D0=B4=D1=91=D0=BD=20=D0=BD=D0=B0=20Qwen3-ASR?= =?UTF-8?q?-0.6B=20(=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BE=D1=87=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B3=D0=BE=D0=BD=20wav)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pw/binom/viewmate/phone/stt/SttDebug.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app-phone/src/main/kotlin/pw/binom/viewmate/phone/stt/SttDebug.kt b/app-phone/src/main/kotlin/pw/binom/viewmate/phone/stt/SttDebug.kt index 63bbfe0..eaee2fd 100644 --- a/app-phone/src/main/kotlin/pw/binom/viewmate/phone/stt/SttDebug.kt +++ b/app-phone/src/main/kotlin/pw/binom/viewmate/phone/stt/SttDebug.kt @@ -23,16 +23,24 @@ object SttDebug { // через: adb push /data/local/tmp/... + run-as pkg cp val modelsDir = File(context.filesDir, "models") val vadModel = File(modelsDir, "silero_vad.onnx").absolutePath - val encoder = File(modelsDir, "small-encoder.int8.onnx").absolutePath - val decoder = File(modelsDir, "small-decoder.int8.onnx").absolutePath - val tokens = File(modelsDir, "small-tokens.txt").absolutePath + val convFrontend = File(modelsDir, "conv_frontend.onnx").absolutePath + val encoder = File(modelsDir, "encoder.int8.onnx").absolutePath + val decoder = File(modelsDir, "decoder.int8.onnx").absolutePath + val tokens = File(modelsDir, "tokenizer").absolutePath log("[stt] создаём VAD...") val segments = VadSegmenter.vadSegments(wav.samples, vadModel) log("[stt] фраз (VAD): ${segments.size}") - log("[stt] создаём Whisper-small (int8, CPU)...") - val stt = WhisperStt(encoder, decoder, tokens, numThreads = 4) + log("[stt] создаём Qwen3-ASR-0.6B (int8, CPU)...") + val stt = Qwen3AsrStt( + convFrontendPath = convFrontend, + encoderPath = encoder, + decoderPath = decoder, + tokenizerDir = tokens, + numThreads = 4, + hotwords = "тулсет,тулы,умеешь", + ) val parts = ArrayList() for ((i, seg) in segments.withIndex()) { val startMs = seg.first / 16