ImportError: cannot import name 'apply_realtime_delay' from 'amazon_transcribe.utils' when running...

A user installed amazon-transcribe from PyPI and ran the simplefile.py example, but hit ImportError: cannot import name 'applyrealtimedelay' from 'amazontranscribe.utils'. Root cause: the examples in the repo's develop branch used a function that was newer than the latest PyPI release (v0.6.0 at the time). The released package simply did not have applyrealtimedelay yet, so the example code did not match the installed library. The function shipped in v0.6.1.

Your example code is newer than your installed package. Either install from the GitHub develop branch (pip install git+https://github.com/awslabs/amazon-transcribe-streaming-sdk.git@develop) or use the examples from the v0.6.0 tag, which match the PyPI release. The function was released in v0.6.1, so upgrading to 0.6.1 or later also fixes it. General rule: when an SDK example throws an ImportError on a function you can see in the repo, check whether the example came from a newer branch than your installed version. Source: https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/73

Source: https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/73