Unable to use GCP signed URL with Azure Cognitive Speech to text

Syed Hussain 1 Reputation point
2021-10-14T14:16:42.597+00:00

I have uploaded an audio file on GCS bucket and then I created a signed URL for the file using this method:

storage.signUrl(
                blobInfo,
                DURATION,
                TimeUnit.DAYS,
                Storage.SignUrlOption.httpMethod(HttpMethod.GET),
                Storage.SignUrlOption.withContentType()
        );

When I pass this URL to Azure cognitive Speech to text service using the batch transcription REST API this is the request body of azure's create transcription API

{
  "contentUrls": [
    "gcpsignedurl"
  ],
  "properties": {
    "diarizationEnabled": false,
    "wordLevelTimestampsEnabled": false,
    "punctuationMode": "DictatedAndAutomatic",
    "profanityFilterMode": "Masked"
  },
  "locale": "en-US",
  "displayName": "Transcription using default model for en-US"
}

the transcription job gets created and I get the location URL of transcription from the header, now when I Am calling the location URL I get this error

"error": {
  "code": "InvalidUri",
  "message": "Authentication failed for recordings URI."
}
"status": "Failed"

how do I solve this problem?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,061 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,601 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GiftA-MSFT 11,176 Reputation points
    2021-10-14T21:30:17.097+00:00

    Hi, according to the documentation, batch transcription can read audio from a public-visible internet URI, and can read audio or write transcriptions using a SAS URI with Azure Blob storage. It's possible that the url provided doesn't meet the above criteria. The following document (although for a different service) shows how to generate SAS token.


    --- *Kindly Accept Answer if the information helps. Thanks.*

    0 comments No comments

  2. Mario 1 Reputation point
    2022-01-19T07:33:04.387+00:00

    Hello there,

    I'm currently facing the same issue in which I'd need to use a presigned URL in the "contentUrls" property.
    My audio files reside in a 3rd party storage and are private.

    Are there any updates on this or is it still only possible to use Azure Cognitive Services if the audio files either have a public-visible internet URI or reside within Azure Blob storage?
    @Syed Hussain have you made any progress on this? Which approach did you take?

    Kind regards

    0 comments No comments

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.