jianfch / stable-ts

Transcription, forced alignment, and audio indexing with OpenAI's Whisper
MIT License
1.59k stars 177 forks source link

faster-whisper 1.1.0 breaks stable-ts #418

Closed McCloudS closed 4 days ago

McCloudS commented 4 days ago

https://github.com/SYSTRAN/faster-whisper/releases/tag/v1.1.0 result = model.transcribe_stable(task=task, language=language, **args) causes: Exception: 'dict' object has no attribute '_asdict'

I'm guessing replace NamedTuple with dataclass in Word, Segment, TranscriptionOptions, TranscriptionInfo, and VadOptions, this allows conversion to json without nesting. Note that _asdict() method is still available in Word and Segment classes for backward compatibility but will be removed in the next release, you can use dataclasses.asdict() instead. is the issue?

jianfch commented 4 days ago

This was fixed in fe00aaf2bd64603decb4c01557b1d39431809793. Since this is not in the latest PyPI release yet, try updating to latest commit.

McCloudS commented 4 days ago

Totally missed that, sorry! Getting complacent with pip packages.

Thanks for your help!