speechmatics-python icon indicating copy to clipboard operation
speechmatics-python copied to clipboard

Version 4.0.2 - AttributeError: 'AudioSettings' object has no attribute 'items'

Open J-Jaywalker opened this issue 8 months ago • 1 comments

Description In 4.0.2, when calling run() or run_synchronously() to transcribe, such as in examples in files transcribe_from_microphone.py or transcribe_youtube.py, the client raises an AttributeError: "'AudioSettings' object has no attribute 'items'"

This is because of the introduction of multichannel mode support. For 4.0.2, passing arguments such as transcription config, stream and audio settings positionally will result in this bug. This is because this multichannel support version introduces new flags that need to be keyword passed, which muddles up positional arguments.

This has been patched in version 4.0.4

To Reproduce Run any example or existing code that calls the above functions with positional arguments, e.g.

run(
    transcription_config=conf,
    stream=RawInputStreamWrapper(stream),
    audio_settings=settings

The error should appear in the output log.

Expected behavior This should be able to handle both positional and keyword arguments for transcribing.

J-Jaywalker avatar Jun 10 '25 15:06 J-Jaywalker