Skip to content

No audio splitting for batch ASR providers (e.g. GLM-ASR 30s limit) #508

Description

@dempsey-wen

Problem

OpenLess sends the entire recording as a single WAV file to the ASR provider. There is no audio splitting/chunking logic — the audio buffer is accumulated and uploaded in one request:

fnconsume_pcm_chunk(&self,pcm:&[u8]){self.buffer.lock().extend_from_slice(pcm);}

This works fine for streaming providers (volcengine WebSocket, Qwen realtime), but fails for batch/file-upload ASR providers that have a per-request duration cap.

Affected providers

ProviderInterfaceMax duration
zhipu GLM-ASRHTTP batch30 seconds
volcengineWebSocket streamingNo hard limit
Qwen ASR (realtime)WebSocket streamingNo hard limit
Local Qwen3-ASRLocal inferenceNo limit

When using GLM-ASR and recording exceeds 30 seconds, the API rejects the request and transcription fails silently (no error shown in UI).

Suggested fix

  • Detect the recording duration before sending.
  • If the duration exceeds the provider's limit, split the audio into chunks (e.g. at silence boundaries), send each chunk separately, and concatenate the results.
  • Alternatively, show a warning or auto-stop recording when approaching the limit for batch providers.

Environment

  • OpenLess version: 1.3.2
  • OS: Linux (Ubuntu, kernel 6.8.0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions