Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Cohere Transcribe truncates audio (with fix)

Open
#736 10 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@altic-dev is already working on this.

Since Aug 2, 2026.

  • #761 by @altic-dev — closed without merging
  • #763 by @altic-dev — closed without merging

Assessment

This issue has not been assessed yet.

Description

bug keep-open stale
Describe the bug

Summary

The "Cohere - High Accuracy" model in Fluid Voice silently only transcribes the beginning of the recording. The same model produces complete transcripts when run through HuggingFace's long-form chunking pipeline.

Root cause:
Cohere Transcribe's architecture requires chunked/long-form processing for audio longer than its feature extractor's max_audio_clip_s window. In single-pass mode, the model simply stops generating after one window's worth of audio.

The fix is in Cohere's own pipeline: the processor's audio_chunk_index output must be passed through to both model.generate() and processor.decode(). This triggers the chunked processing that reassembles per-chunk transcriptions. See: https://huggingface.co/CohereLabs/cohere-transcribe-03-2026 → "Long-form transcription" section.

Verification: running the same audio through the chunked pipeline locally produces the complete transcript with no truncation (tested with transformers 5.14.1, max_new_tokens=1024, audio_chunk_index passed through).

Environment

  • Fluid Voice 1.6.5, macOS
  • Model: "Cohere - High Accuracy" / Cohere Transcribe
  • Audio: 48-second mono recording, m4a format
  • macOS on Apple Silicon (M3 Pro)

Workaround / fix reference:

The fix is to use Cohere's long-form chunked pipeline, which passes audio_chunk_index through the generate/decode chain. Here's a minimal working example that produces complete transcripts:

from transformers import AutoProcessor, CohereAsrForConditionalGeneration
from transformers.audio_utils import load_audio

processor = AutoProcessor.from_pretrained("CohereLabs/cohere-transcribe-03-2026")
model = CohereAsrForConditionalGeneration.from_pretrained(
    "CohereLabs/cohere-transcribe-03-2026", device_map="auto"
)

audio_array = load_audio("speech.wav", sampling_rate=16000)

# Key: use audio= (numpy array), NOT raw waveform — this triggers chunking
inputs = processor(audio=audio_array, sampling_rate=16000, return_tensors="pt", language="en")
audio_chunk_index = inputs.get("audio_chunk_index")  # ← this is what's missing in single-pass
inputs.to(model.device, dtype=model.dtype)

outputs = model.generate(**inputs, max_new_tokens=1024)

# Pass audio_chunk_index to decode so chunks are reassembled
text = processor.decode(
    outputs, skip_special_tokens=True,
    audio_chunk_index=audio_chunk_index, language="en"
)
if isinstance(text, list):
    text = text[0]
print(text)

The CoreML port in Fluid Voice appears to run single-pass without chunking, which causes the model to stop generating after one feature-extractor window (~35s).

Reproduction steps
  1. In Fluid Voice -> Voice Engine, select "Cohere - High Accuracy (Cohere Transcribe)"
  2. Transcribe any audio file longer than ~35 seconds
  3. Compare the output to the same file transcribed via HuggingFace's pipeline
Expected behavior

Complete transcript of the entire audio file.

Actual behavior

The transcript cuts off after approximately 35 seconds of audio. No error or warning is shown — the truncation is silent, making it easy to miss that content is lost.

Example: a 48-second test recording consistently produces a transcript that stops mid-sentence at roughly the 35-second mark. The last ~13 seconds (containing 5 full sentences) are silently dropped. Tested twice with identical results.

App Version

Fluid Voice 1.6.5

macOS Version

MacOS Tahoe 26.5.1, Apple M3 Pro

Architecture

Apple Silicon

Logs or crash report

Screenshots or screen recording

No response

Dominant language
Swift
Stars
11.9k
Forks
863
Avg merge
1d 22h
Merged PRs (30d)
29

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from altic-dev/FluidVoice

All issues in altic-dev/FluidVoice

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.