awslabs / amazon-transcribe-streaming-sdk

The Amazon Transcribe Streaming SDK is an async Python SDK for converting audio into text via Amazon Transcribe.
Apache License 2.0
151 stars 38 forks source link

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

Closed arrowkato closed 1 year ago

arrowkato commented 2 years ago

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)
ArtemBernatskyy commented 2 years ago

@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

nateprewitt commented 2 years ago

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.

arrowkato commented 2 years ago

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

nateprewitt commented 1 year ago

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