与 AWS Lambda 一起使用时 azure-cognitiveservices-speech api 错误
azure-cognitiveservices-speech api error while using with AWS Lambda
我正在尝试使用 Microsoft 语音在 AWS Lambda 中发送文本 api(azure-cognitiveservices-speech)。在 AWS Lambda 中,我使用 docker 图像(public.ecr.aws/lambda/python:3.8)。当我 运行 代码出现以下错误时:
Speech Recognition canceled: CancellationReason.Error
Error details: Runtime error: Failed to initialize platform (azure-c-shared)
我尝试通过关注 https://docs.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 来解决问题
但仍然出现相同的错误
我已经通过使用 ubuntu 基本客户 docker 图像解决了这个问题。问题出在 lambda docker 基础映像上,因为它不支持 Azure SKD(azure-cognitiveservices-speech)。所以我使用自定义 docker 图像。作为参考,我正在分享我的自定义 docker 图片的 GitHub link - Github 1https://github.com/Ravisiswaliya/azure_speech_to_text_with_aws_lambda
我正在尝试使用 Microsoft 语音在 AWS Lambda 中发送文本 api(azure-cognitiveservices-speech)。在 AWS Lambda 中,我使用 docker 图像(public.ecr.aws/lambda/python:3.8)。当我 运行 代码出现以下错误时:
Speech Recognition canceled: CancellationReason.Error
Error details: Runtime error: Failed to initialize platform (azure-c-shared)
我尝试通过关注 https://docs.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 来解决问题 但仍然出现相同的错误
我已经通过使用 ubuntu 基本客户 docker 图像解决了这个问题。问题出在 lambda docker 基础映像上,因为它不支持 Azure SKD(azure-cognitiveservices-speech)。所以我使用自定义 docker 图像。作为参考,我正在分享我的自定义 docker 图片的 GitHub link - Github 1https://github.com/Ravisiswaliya/azure_speech_to_text_with_aws_lambda