Hello @MH Thanks for reaching out to us. If you are having issues with Azure Speech-to-Text not working in AWS Lambda, there could be a few possible reasons:
- Network connectivity: Lambda functions run inside a VPC (Virtual Private Cloud) by default, which means they may not have internet access unless you explicitly configure the VPC to allow outbound internet traffic. If Azure Speech-to-Text is not accessible from within your Lambda function, this could be due to network connectivity issues.
- Authentication: Azure Speech-to-Text requires an authentication token to access the service. If you are not passing the correct credentials or if the token has expired, the service will not work. Make sure you have provided the correct subscription key and region for your Azure Speech-to-Text service.
- Runtime dependencies: The Azure Speech-to-Text SDK has some runtime dependencies, such as the
pyaudio
library, that may not be available in the AWS Lambda runtime environment. Make sure all required dependencies are included in your deployment package. - Resource limitations: AWS Lambda functions have limits on the amount of memory and CPU time they can use. If your function is running out of resources while trying to transcribe speech, it may not work correctly.
To troubleshoot the issue, you can start by checking the CloudWatch logs for your Lambda function to see if there are any error messages or exceptions being thrown. You can also try running the same code outside of Lambda to see if it works correctly, and make sure all dependencies are included in your deployment package.
Please have a try and let me know is you still see more issue. If you are still blocked by this issue, we would like to recommend you raise a support ticket for this issue. Let us know if you have no support plan and we are happy to enable you a free ticket for this issue.
Regards, Yutong
-Please kindly accept the answer if you feel helpful to support the community, thanks a lot.