3

I am trying to use Microsoft speech to text api(azure-cognitiveservices-speech) in AWS Lambda. In AWS Lambda I am using docker image(public.ecr.aws/lambda/python:3.8). when I run the the code I am getting the following error:

Speech Recognition canceled: CancellationReason.Error
Error details: Runtime error: Failed to initialize platform (azure-c-shared)

I tried to solve issue by following https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-sdk?tabs=linux%2Crhel-centos%2Cios-xcode%2Cmac-xcode%2Candroid-studio#get-the-speech-sdk But still getting the same error

Ravi Siswaliya
  • 133
  • 1
  • 10
  • 1
    I am getting the same "Failed to initialize platform (azure-c-shared)" in AWS on EC2 on Amazon Linux starting with versions of 1.19 of the Azure Speech SDK. I also followed all the steps to configure for Linux. Couple of notes:
    1. versions of SDK <= 1.18 didn't have to configure anything extra and had no such errors 2. versions of SDK >= 1.19 work for me locally on Mac OS just fine without any extra configuration
    – Koka Apr 25 '22 at 15:08

1 Answers1

1

I have solved this issue by using ubuntu base customer docker image. The issue was with lambda docker base image as this does not support Azure SKD(azure-cognitiveservices-speech). So I use custom docker image. For ref I am sharing GitHub link of my custom docker image - Github 1https://github.com/Ravisiswaliya/azure_speech_to_text_with_aws_lambda

Ravi Siswaliya
  • 133
  • 1
  • 10