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
140 stars 38 forks source link

Error when importing amazon-transcribe package #86

Closed sm-andrew-w closed 1 year ago

sm-andrew-w commented 1 year ago

I am trying to run the amazon-transcribe package (v0.6.1) in Python 3.9, and running into an error when importing the package in my script. I basically just copied the quick-start example code from this repo, but when I run, this is the error:

(.awst_env) PS C:\dev\conversation-tests\providers> python .\amazon_transcribe.py
Traceback (most recent call last):
  File "C:\dev\conversation-tests\providers\amazon_transcribe.py", line 20, in <module>
    import amazon_transcribe
  File "C:\dev\conversation-tests\providers\amazon_transcribe.py", line 21, in <module>
    from amazon_transcribe.client import TranscribeStreamingClient
ModuleNotFoundError: No module named 'amazon_transcribe.client'; 'amazon_transcribe' is not a package

Does anyone know what might cause this?

sm-andrew-w commented 1 year ago

Ok this was my fault, my script was called amazon_transcribe.py and that was confusing the import system, sorry about that 😅