Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deprecated-api-removal): removed deprecated media-translations api for google transcriptions #284

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/guides/capabilities/audio/transcriptionGoogle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 4
sidebar_slug: transcriptions-google
---

To add the realtime audio transcriptions in a Dyte meeting you can use Google Cloud Speech-to-Text
To add the realtime audio transcriptions in a Dyte meeting you can use Google Cloud Speech-to-Text and Cloud translation APIs.

These Google services are paid, a Google Cloud account is required to proceed.

Expand All @@ -18,17 +18,17 @@ This integration is Web only at the moment

## 1. Setup Google Cloud Credentials

You must have a service account with GCP (Google Cloud Platform) to use Google transcriptions. Please create a project in that account that allows Google Media Translations and Google Translations API.
You must have a project & a service account with GCP (Google Cloud Platform) to use Google transcriptions. Make sure that service account allows Google Speech-to-Text and Google Translation API.

Once done, download the keys for the service account.

## 2. Setup a Server

Setup a server to forward the Audio Data from client to Google Cloud. You don't want to put your GCP credentials on client side and therefore need a server which forwards audio data to Google Cloud

For this, we have provided a sample in NodeJS for you to checkout (dyte-io/google-transcription)[https://github.com/dyte-io/google-transcription/tree/main/server]. Please find it here. Currently, we only have NodeJS samples; if you're working on a different backend, feel free to port this code or connect with us to help you port it.
For this, we have provided a sample in NodeJS for you to checkout (dyte-io/google-transcription)[https://github.com/dyte-io/google-transcription/tree/main/server]. Please find it here. Currently, we only have NodeJS samples; if you're working on a different backend, feel free to port this code.

To use this sample, please clone this using the following command.
To use this sample, please clone the repository using the following command.

```
git clone git@github.com:dyte-io/google-transcription.git
Expand All @@ -50,7 +50,7 @@ Note: PRIVATE_KEY should be in a single line. Try picking the value from the ser
npm install
```

This would automatically install @google-cloud/media-translation, @google-cloud/speech, and @google-cloud/translate.
This would automatically install @google-cloud/speech, and @google-cloud/translate.

```
npm run dev
Expand Down Expand Up @@ -85,7 +85,7 @@ const speech = new DyteGoogleSpeechRecognition({
meeting, // Dyte meeting object from DyteClient.init
target: 'hi', // Language that the current user wants to see
source: 'en-US', // Language that the current user would speak in
baseUrl: <backend-url>, // Backend URL from step 2.4
baseUrl: <backend-url>, // Backend URL from step 2.2
});

speech.on('transcription', async (data) => {
Expand Down
Loading