How to find the associated audio recording for a recognized sentence (RecongitionResult.ResultId?)

Billy Lo 0 Reputation points
2025-02-10T17:06:29.9233333+00:00

The audio recording has some meta data, but I am unable to correlate it with the RecognitionResult's ResultId. Would you be able to guide me on how to link the RecognitionResult with the audio logs?

Thank you!

 {

      "self": "https://northcentralus.api.cognitive.microsoft.com/speechtotext/v3.2-preview.2/endpoints/base/en-US/files/logs/2025-02-10_050047__00a3bf3e-6289-4320-9e47-d3920d24114f_wav",

      "name": "050047__00a3bf3e-6289-4320-9e47-d3920d24114f.wav",

      "kind": "Audio",

      "links": {

        "contentUrl": "https://spsvcprodusncaudiolog.blob.core.windows.net/audiologs-cris/2f0fa5a4baf84a9ea936876d8f1716a2/en-US/2025-02-10/050047_00a3bf3e-6289-4320-9e47-d3920d24114f.wav?skoid=0a751793-f4ab-4bb3-8daa-61e0d636fefe&sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d&skt=2025-02-10T04%3A57%3A21Z&ske=2025-02-15T05%3A02%3A21Z&sks=b&skv=2021-08-06&sv=2025-01-05&st=2025-02-10T04%3A57%3A21Z&se=2025-02-10T17%3A02%3A21Z&sr=b&sp=rl&sig=3vZPIm3e5g7C6F6txNe1lmKPpOIfu41WJrga%2B4EwOVg%3D"

      },

      "properties": {

        "size": 396254

      },

      "createdDateTime": "2025-02-10T05:00:47Z"

    }

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,904 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 28,381 Reputation points
    2025-02-10T22:33:40.49+00:00

    The RecognitionResult object typically contains a ResultId property, which is a unique identifier for the recognition result so you can use it to link the result to the corresponding audio file.

    The audio log metadata (as shown in your YAML example) contains a self URL and a contentUrl. These URLs point to the audio file and its location in Azure Blob Storage.

    The name field in the metadata often contains a unique identifier for example 050047__00a3bf3e-6289-4320-9e47-d3920d24114f.wav and you can use it to correlate with the ResultId.

    When you submit an audio file for recognition, Azure AI Speech generates a ResultId for the recognition result. You should store this ResultId along with the audio file metadata (the name or contentUrl) in your application database or logging system.

    You can have 3 cases of usage :

    If you are using Azure Blob Storage for audio files, you can include the ResultId as part of the metadata for the blob. This way, you can query the blob metadata using the ResultId to retrieve the corresponding audio file.

    If you are using the Azure Speech SDK, you can access the ResultId from the RecognitionResult object and log it alongside the audio file metadata.

    If you are using the REST API, the response will include the ResultId, which you can then associate with the audio file.


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.