question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Live transcription implementation on ReactJS app

See original GitHub issue

What happened and what did you expect to happen?

I’m currently needing to implement a feature that will show the entire transcript during the meeting. I completed the first step which would be “Creating a Service-Linked Role for Amazon Chime Live Transcription” from this url (https://docs.aws.amazon.com/chime/latest/ag/using-service-linked-roles-transcription.html)

after that, as soon as the meeting starts I call this url -> meetings/${meetingIdFromAWS}/transcription?operation=start that meetingIdFromAWS is MeetingId returned from join?title=meetingId&name=name&regionregion

First problem: in my local computer this url returns 404 not found meetings/${meetingIdFromAWS}/transcription?operation=start, only on production this url works

Second problem: even in production when I call this url and it returns 200(OK), the class Transcript of this import always returns empty

import { Transcript } from 'amazon-chime-sdk-js';

const transcript = new Transcript();
console.log('transcript', transcript);

I’m kind of confused about the documentation, what would be the correct way to use this transcription feature

Have you reviewed our existing documentation?

Reproduction steps

npm run start

Amazon Chime SDK for JavaScript version

^2.17.0

What browsers are you seeing the problem on?

Chrome

Browser version

97.0.4692.99 64 bits

Meeting and Attendee ID Information.

No response

Browser console logs

none

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
xuesichaocommented, Feb 21, 2022

@Brenerss I assume you were using the HTTP request to start the transcription service following this doc: https://docs.aws.amazon.com/chime/latest/dg/initiate-transcription.html

I’m not familiar with this part. However I checked our browser demo where it calls StartMeetingTranscription API to start the transcription service.

Could you please follow below steps to start the transcription service and see if it helps?

  1. Use either of the chime or chimeSDKMeetings client. https://github.com/aws/amazon-chime-sdk-js/blob/db36d8a4191ad6fe58af68d51008c12a5b1286a9/demos/browser/server.js#L28-L38

  2. Use the above client to call startMeetingTranscription() API.

2reactions
xuesichaocommented, Feb 8, 2022

@Brenerss For your second question:

even in production when I call this url and it returns 200(OK), the class Transcript of this import always returns empty

According to our doc:

OK (200) with empty body, if you successfully apply the TranscriptionConfiguration to the meeting.

You got the response 200, basically it means you started the transcription service successfully. I assume the cause here is you used the wrong way to receive the transcription result.

According to our demo App implementation and the AWS doc:

You need to implement a transcript event dandler, and subscribe to transcript event:

transcriptEventHandler = (transcriptEvent: TranscriptEvent): void => {
  // `transcriptEvent` could be either a `Transcript` or `TranscriptionStatus`
  // if it is `Transcript`, then it should contain transcription results
  // else you need to handle the logic of `TranscriptionStatus` changes (start/ stop/ ...)

  if (transcriptEvent instanceof TranscriptionStatus) {
    // Print Transcript Status, could be `STARTED`, `INTERRUPTED`, `RESUMED`, `STOPPED` or `FAILED`
    console.log(transcriptEvent.type);
  } else if (transcriptEvent instanceof Transcript) {
    // Print Transcript result collection
    console.log(transcriptEvent.results);
  }
};

this.audioVideo.transcriptionController?.subscribeToTranscriptEvent(this.transcriptEventHandler);

No problem, please refer to our demo App implementation. This should be most useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Speech-to-Text streaming demo in React - createIT
Transcribing live streamed audio to text has become more and more popular. It's useful in preparing subtitles or archiving conversation in ...
Read more >
Building a Real-Time Speech to Text React Application
After starting the React application, we have a fully functioning project with transcription and text to speech capabilities that you can adjust ...
Read more >
How to build a transcription app in React Native
In this tutorial, I'll walk you through creating a simple transcription app in React Native using the React Native Voice library. Our React ......
Read more >
How to Add Speech Recognition to Your React and Node.js ...
If you have a React project you can follow along with this post to add Deepgram for speech-to-text transcription to your project.
Read more >
React Text to Speech - Simplified! - AssemblyAI
In our last React tutorial, we built a Speech-to-Text app using React and the AssemblyAI API. But did you know that we can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found