Giter Site home page Giter Site logo

aws-samples / chime-live-translation-transcription-polly Goto Github PK

View Code? Open in Web Editor NEW
12.0 10.0 3.0 2.58 MB

WebApp Proof of Concept - Live Translation + Polly

License: MIT No Attribution

JavaScript 4.06% HTML 0.63% TypeScript 91.73% CSS 3.58%
amplify api-gateway appsync chime cognito dynamodb lambda polly transcribe translate

chime-live-translation-transcription-polly's Introduction

Live Translation using AI (Amazon Chime + Amazon Transcribe + Amazon Translate + Amazon Polly)

Architecture Diagram

ArchDiagram.jpg

CONTEXT

  1. This was a prototype to show the "Art of the Possible" of what the AWS services can be paired together
  2. This is NOT a production SaaS product
  3. This was used and testesd using a desktop Chrome browser. Since this prototype, we invite pull requests for further bug fixes and/or browser support.

Getting Started

  1. yarn; yarn start

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Contributing

We welcome community contributions and pull requests. See CONTRIBUTING.md for information on how to set up a development environment and submit code.

Content Security Legal Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

Operational Metrics Collection

This solution collects anonymous operational metrics to help AWS improve the quality and features of the solution. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply remove the tag(s) starting with “uksb-” or “SO” from the description(s) in any CloudFormation templates or CDK TemplateOptions.

chime-live-translation-transcription-polly's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chime-live-translation-transcription-polly's Issues

Value null at 'mediaSampleRateHertz' failed to satisfy constraint: Member must not be null

Expected behavior and actual behavior

ANSWER:

Expected:

  1. Sign in to the app
  2. Add a request ID in the "Request ID" filed and click "Join"
  3. Get prompted for browser access to mic and camera
  4. Click "Transcribe"
  5. Start speaking, and what is said is transcribed in the Transcription window

Actual behaviour on Firefox:

  1. Sign in to the app
  2. Add a request ID in the "Request ID" filed and click "Join"
  3. Get prompted for browser access to mic and camera
  4. Click "Transcribe"
  5. Error window pops up with the following message:

An error occurred while recording: {"Message":"1 validation error detected: Value null at 'mediaSampleRateHertz' failed to satisfy constraint: Member must not be null"}

Steps to reproduce the problem

ANSWER:

  1. In a terminal, clone the repo and navigate to the "chime-live-translation-transcription-polly" directory
  2. run "yarn"
  3. run "yarn start" to start up the local server
  4. In a Firefox browser, navigate to "localhost:3000"
  5. Sign in to the app
  6. Add a request ID in the "Request ID" filed and click "Join"
  7. Get prompted for browser access to mic and camera
  8. Click "Transcribe"

Specifications like the version of the project, operating system, or hardware

ANSWER:

Project version:
Used main branch of the project with latest commit ID 7c936d2

OS:
Mac [Ventura 13.3.1]

Browser details:
Firefox version 102.10.0esr

Observations

  • From what I can see the error is originating from the following line:

const command = new StartStreamTranscriptionCommand({ LanguageCode: language, MediaEncoding: 'pcm', MediaSampleRateHertz: sampleRate, AudioStream: audioStream, });

In Firefox, the value "sampleRate" passed for the MediaSampleRateHertz is null

  • seems like sampleRate is being set here:

sampleRate = mediaStream.getAudioTracks()[0].getSettings().sampleRate;

However, with Firefox, the object returned by "mediaStream.getAudioTracks()[0].getSettings()" does not include "sampleRate"

  • Overriding the sampleRate value and setting it to 44100 directly resolves the error, but then the app does not pick up any audio and no transcription is generated. After 15 seconds, the streaming session times out due to inactivity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.