How do I transcript a call made using Azure Communication Services.

IT Dextrous 0 Reputation points
2024-02-13T11:32:25.7766667+00:00

I want to record the call made using azure communication services and transcript it. Even if recording is not available its fine. But How do I get the transcription of the call.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,232 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ruslan Zdor 5 Reputation points Microsoft Employee
    2024-02-14T21:34:06.5833333+00:00

    Hello @IT Dextrous Unfortunately today ACS SDK is not allow to start recording or transcription, so there are no way to get it after the call. But you can try to use CallCaptionsFeature to receive speech to text updates and combine them. This API is still in beta, so you will have to use npm install @azure/communication-calling@next --save I would suggest to check resultType variable - "Final" mean that this block will not be updated (in general it happens when participant makes pause). Here is example:

    const client = new CallClient();
    const agent = await client.createCallAgent(new AzureCommunicationTokenCredential('token'));
    
    const call = agent.startCall([{id: ""}]);
    
    const captionsFeature = call.feature(Features.Captions);
    
    let baseCaptions = captionsFeature.captions;
    
    let captions = baseCaptions as Captions;
    
    captions.on('CaptionsReceived', (e) => {
        if (e.resultType == "Final") {
            e.speaker.displayName; // speaker name
            e.spokenText; // spoken text
            // store it
        }
    });
    
    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.