Saving memory stream to blob works locally but does not work when deployed to Azure

GuyG-9858 1 Reputation point
2023-03-03T01:01:25.2533333+00:00

I am working with an azure function that generates a byte array from the speech synthesis SDK. The byte array is saved to a blob. The function then returns the blob URI. The process works fine locally, I've submitted some text and can download the generated audio file and it plays back fine.

When I deploy the function to Azure, the end point does NOT create the blob even though all the connections are ok, the access token is fine. I've added exception handling to see what could be the issue but it does not throw an exception (I get a 202 accepted response in Postman). I am using an access key instead of an identity, the blob container is configured for public access. I checked the blob container and the file is not created. I'm using the Azure.Storage.Blob library. I've attached a small screen shot of the code. User's image

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,931 questions
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GuyG-9858 1 Reputation point
    2023-03-03T15:05:14.15+00:00

    I found the issue, turns out I had the wrong speech region in Azure compared to my local configuration.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.