Skip to content

Commit 253a9d3

Browse files
vNeeL-codeclaude
andcommitted
Revert audio to WAV format — WAV was confirmed working at 6s clips
The pcm frames error is likely unrelated to format. WAV (RIFF header + PCM 16kHz mono 16-bit) was the tested working format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fcf71cc commit 253a9d3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/main/kotlin/com/gemma/api/mcp/MCPServer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ class MCPServer(
355355
return ToolResult(false, "", "No microphone permission")
356356
}
357357

358-
val audioData = audioRecorder.record(duration, rawPcm = true) // Raw PCM for LiteRT-LM
358+
val audioData = audioRecorder.record(duration, rawPcm = false)
359359
?: return ToolResult(false, "", "Audio recording failed")
360360

361361
// Deliver audio bytes via callback so GemmaService can queue them for next inference

app/src/main/kotlin/com/gemma/api/ui/InputOverlay.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class InputOverlay(
163163
recordingJob = CoroutineScope(Dispatchers.Main).launch {
164164
Timber.i("InputOverlay: Recording up to 30s audio...")
165165
val audio: ByteArray? = withContext(Dispatchers.IO) {
166-
audioRecorder.record(30, true) // Raw PCM for LiteRT-LM (no WAV header)
166+
audioRecorder.record(30, false)
167167
}
168168

169169
// Recording finished (either released or hit 30s cap)

0 commit comments

Comments
 (0)