Is there a mapping between SessionId and LogId

Sai Vishnu Soudri 60 Reputation points
2025-03-05T08:41:27.56+00:00

Hi team,

I would like to know if there is a mapping between sessionId that Azure SDK provides to the logId with which the transcripts and recordings are logged on Azure.

I am referring to this blog to log transcripts with Azure.

While I can retrieve the list of all the logs using this , I would like to view recording and transcript of particular sessionIds. Please let me know if there is a way to get this.

Thanks, Sai Vishnu Soudri

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

1 answer

Sort by: Most helpful
  1. Pavankumar Purilla 4,025 Reputation points Microsoft External Staff
    2025-03-06T18:34:30.67+00:00

    Hi Sai Vishnu Soudri,
    Greetings & Welcome to the Microsoft Q&A forum! Thank you for sharing your query. 

    Based on the information available, there is no direct mapping between the SessionId provided by the Azure SDK and the LogId used for storing transcripts and recordings. However, you can use the following approaches to work with session-specific logs:

    1 Enable Logging in Azure SDK:

    • You can enable logging for your application using the Azure Speech SDK. The SessionId can be retrieved from the logs generated during the session. For example, in the logs, you can find entries like:
        SessionId: 0b734c41faf8430380d493127bd44631
      
    • This SessionId is unique to each session and can be used to identify logs related to that session.

    2 Accessing Transcription Logs:

    • Transcription logs are stored asynchronously by the Azure Speech Service. You can enable logging for audio and transcription using the EnableAudioLogging() method in the SDK or by configuring the logging settings for your endpoint.
    • These logs are retained for 30 days and can be accessed or deleted as needed. If you use Azure Storage with the "Bring Your Own Storage" (BYOS) feature, you can store and manage these logs in your own storage account.

    3.Custom Mapping:

    • If you need a direct mapping between SessionId and LogId, you may need to implement a custom solution. For example:
      • Store the SessionId and corresponding LogId in a database or a structured log file during the session.
      • Use this mapping to retrieve the specific transcript or recording for a given SessionId.

    4.Using REST API:

    • If you are using the REST API for speech-to-text, you can inject a custom X-ConnectionId (a GUID) into the request. This can act as a unique identifier for the session and can be used to track logs.

    For more details, getting Session IDs and logging audio and transcriptions.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.


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.