Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Latest commit

 

History

History
61 lines (48 loc) · 2.97 KB

SPEECH-TRANSLATION.md

File metadata and controls

61 lines (48 loc) · 2.97 KB

Enable speech translation with Machine Learning technologies on Google Cloud Platform

The PlayChat sample supports speech messages that are automatically translated to different languages by a microservice on Google Cloud Platform (GCP).

The microservice is implemented as a Google Cloud Function that uses the Speech-to-Text, Translation, and Text-to-Speech APIs to process the audio messages. The translated messages are stored in a bucket on Google Cloud Storage where the PlayChat app can retrieve them. The microservice is available in the Speech-to-Speech Translation Sample.

The following screenshot shows the PlayChat sample with a message translated to French.

PlayChat sample app with a translated message

Configuring speech translation

  1. Configure the PlayChat sample following the instructions on the README file.
  2. Deploy the Speech-to-Speech Translation Sample to your GCP project.
  3. Update the value of the speechToSpeechEndpoint field in the speech_translation.xml file with the URL of the function deployed in the previous step.
  4. Make sure that your user account has read permissions to the bucket where the microservice stores the translated audio messages. For more information, see Setting bucket permissions in the Google Cloud Storage documentation.

Launch and test

  1. Start your emulator and run the app.
  2. Sign in with a Google account.
  3. Tap the microphone icon and record a short voice message in the language of your device. The microservice supports English, Spanish, and French by default. However, you can configure other languages.
  4. Change the default language on your device settings. The PlayChat app displays the message on the new language.
  5. Tap the translated message to listen to it in the language of the device.

License

Copyright 2018 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This is not an official Google product.