amazon-transcribe-streaming-sdk icon indicating copy to clipboard operation
amazon-transcribe-streaming-sdk copied to clipboard

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

Open arrowkato opened this issue 3 years ago • 3 comments

Revisions tagged v0.6.0 (the latest version on pypi as of 2022/07/23) do not have an apply_realtime_delay() function.

pip install aiofile
pip install amazon-transcribe

After installing the above, if you run simple_file.py outside of this repository you will get the following error message.

Traceback (most recent call last):
  File "~/PycharmProjects/soundbox/soundbox/asr/simple_file.py", line 11, in <module>
    from amazon_transcribe.utils import apply_realtime_delay
ImportError: cannot import name 'apply_realtime_delay' from 'amazon_transcribe.utils' (~/PycharmProjects/my_repo/venv/lib/python3.8/site-packages/amazon_transcribe/utils.py)

arrowkato avatar Jul 23 '22 04:07 arrowkato

@arrowkato that method was added very recently, you need to install library from the github and not from pypi, like this pip install git+https://github.com/awslabs/amazon-transcribe-streaming-sdk.git@develop

ArtemBernatskyy avatar Jul 28 '22 17:07 ArtemBernatskyy

Hi @arrowkato, @ArtemBernatskyy is correct. This is a newly added function that is available on Github and will be present in the next release. If you're trying to use examples from the current release, you'll want to reference the examples present in the v0.6.0 tag.

nateprewitt avatar Aug 01 '22 18:08 nateprewitt

@ArtemBernatskyy @nateprewitt Thanks for the reply. I have confirmed that the sample code in v0.6.0 tag works, not in the develop branch.

arrowkato avatar Aug 04 '22 03:08 arrowkato

It looks like we never came back to resolve this but it was released with 0.6.1. Thanks everyone.

nateprewitt avatar Nov 16 '22 23:11 nateprewitt