Azure speech-to-text destinationContainerUrl InvalidUri

Kamil 6 Reputation points

I'm trying to save batch transcription results to the storage container. I'm using POST CreateTranscription API with destinationContainerUrl parameter.

Once trying to get transcription I gets an error:

        "error": {  
            "code": "InvalidUri",  
            "message": "The provided container URI is invalid."  

The problem is with SAS URI for destinationContainerUrl .
I generated that SAS URI from the Azure Portal level. (I entered the storage container and selected Shared access tokens from left pane and added write and list permission. I used the Blob SAS URL value as a destinationContainerUrl.

Without destinationContainerUrl my code works fine. My container has a "container" access level.

Could you tell me what I'm doing wrong?

Kind Regards,

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,197 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kamil 6 Reputation points

    Update from me.
    Well I took generated destinationContainerUrl and tried to upload by myself the file there. It worked.
    Here is a pice of code that I used:
    const account = config.storageAccountName;
    const sas = config.sasToken;
    const blobService = new BlobServiceClient(https://${account}${sas});
    const containerClient = blobService.getContainerClient(config.containerName)
    const content = "Hello world!";
    const blobName = "newblob" + new Date().getTime();
    const blockBlobClient = containerClient.getBlockBlobClient(blobName);
    const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
    console.log(Upload block blob ${blobName} successfully, uploadBlobResponse.requestId);

    After that I took that https://${account}${sas} URI and just added my container name after a host and it worked!

    Hym I don't know exactly what happened :D. Seems that I somehow activated it after a "manual" upload. A bit weird but it is working now :)
    Hopefully this info will help someone else

    1 person found this answer helpful.
    0 comments No comments