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
142 stars 37 forks source link

Valid credentials could not be sourced by the IMDS provider #23

Open juanmol opened 3 years ago

juanmol commented 3 years ago

hi, i'm a bit noob. I have downloaded the test.wav file into /tmp/ and modify the script to this. The AWS credentials are stored in ~/.aws/credentials when i run the script with: /tmp# python3 test_voice.py /usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: Linux supports fsync/fdsync with io_submit since 4.18 but current kernel 4.15.0-23-generic doesn't support it. Related calls will have no effect. return f(*args, **kwds) Traceback (most recent call last): File "test_voice.py", line 53, in loop.run_until_complete(basic_transcribe()) File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete return future.result() File "test_voice.py", line 34, in basic_transcribe media_encoding="pcm", File "/usr/local/lib/python3.6/dist-packages/amazon_transcribe/client.py", line 149, in start_stream_transcription creds = await self._credential_resolver.get_credentials() File "/usr/local/lib/python3.6/dist-packages/amazon_transcribe/auth.py", line 45, in get_credentials credentials = await asyncio.wrap_future(self._crt_resolver.get_credentials()) awscrt.exceptions.AwsCrtError: AwsCrtError(name='AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE', message='Valid credentials could not be sourced by the IMDS provider', code=6154)

how can i fix it?