Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] Cohere Transcribe truncates audio (with fix)

Aperta
#736 10 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@altic-dev ci sta già lavorando.

Dal 2/8/2026.

  • #761 di @altic-dev — chiusa senza merge
  • #763 di @altic-dev — chiusa senza merge

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Swift
Stelle
11.9k
Fork
863
Merge medio
1g 21h
PR unite (30g)
28

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di altic-dev/FluidVoice

Tutte le issue di altic-dev/FluidVoice

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.