This project contains five test web applications for AWS services:
- AWS Transcribe - For transcribing pre-recorded audio files
- AWS Translate - For translating text between languages
- AWS Transcribe Streaming - For real-time transcription using the browser's microphone
- AWS Transcribe & Translate - Combined app for real-time transcription and translation
- AWS Polly - Text-to-speech synthesis
Before running these applications, make sure you have:
- Node.js installed (v14 or higher recommended)
- AWS credentials configured in one of the following ways:
- Environment variables:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - AWS credentials file (~/.aws/credentials)
- IAM role if running on AWS services like EC2
- Environment variables:
translate2/
├── transcribe-app/ # AWS Transcribe test application (file-based)
│ ├── public/ # Frontend files
│ │ └── index.html
│ └── server.js # Express server with AWS Transcribe integration
│
├── translate-app/ # AWS Translate test application
│ ├── public/ # Frontend files
│ │ └── index.html
│ └── server.js # Express server with AWS Translate integration
│
├── transcribe-streaming-app/ # AWS Transcribe streaming test application (microphone)
│ ├── public/ # Frontend files
│ │ └── index.html
│ └── server.js # Express server with WebSocket for real-time transcription
│
├── transcribe-translate-app/ # Combined Transcribe & Translate application
│ ├── public/ # Frontend files
│ │ └── index.html
│ └── server.js # Express server with both transcription and translation
│
├── polly-app/ # AWS Polly text-to-speech application
│ ├── public/ # Frontend files
│ │ └── index.html
│ └── server.js # Express server with Polly integration
│
├── package.json
└── README.md
- Start the server:
cd transcribe-app node server.js - Open your browser and navigate to
http://localhost:3000 - Enter the required information:
- Job Name: A unique identifier for your transcription job
- Media URL: S3 URL or publicly accessible URL to your audio file (e.g., s3://my-bucket/audio.mp3)
- Language Code: Select the language of the audio
Notes:
- You must have proper S3 permissions to access the media file
- For S3 URLs, your AWS credentials must have access to that bucket
- For large files, transcription may take several minutes to complete
- Start the server:
cd translate-app node server.js - Open your browser and navigate to
http://localhost:3001 - Enter text in the source text area
- Select source and target languages
- Click "Translate" to see the translation
- Start the server:
cd transcribe-streaming-app node server.js - Open your browser and navigate to
http://localhost:3002 - Select your language from the dropdown
- Click "Start Recording" to begin capturing audio from your microphone
- Speak into your microphone and see the transcription appear in real-time
- Click "Stop Recording" when finished
Notes:
- Browser permission to access your microphone is required
- A stable internet connection is recommended for best results
- Transcription accuracy may vary based on audio quality and background noise
- Start the server:
cd transcribe-translate-app node server.js - Open your browser and navigate to
http://localhost:3003 - Select your source language (for transcription) and target language (for translation)
- Click "Start Recording" to begin capturing audio from your microphone
- Speak into your microphone and see the transcription appear in real-time on the left panel
- Click "Stop Recording" when finished
- Click "Translate" to translate the transcribed text to your target language
- The translation will appear on the right panel
Notes:
- This app combines real-time transcription with on-demand translation
- Browser permission to access your microphone is required
- Translation happens after you stop recording and click the "Translate" button
- You can translate multiple times to different languages without re-recording
- Start the server:
cd polly-app node server.js - Open your browser and navigate to
http://localhost:3004 - Enter text in the text area
- Select a language from the dropdown
- Select a voice (voices are filtered by language)
- Click "Synthesize Speech" to generate audio
- The audio will play automatically and controls will appear
Notes:
- Uses AWS Polly's neural engine for high-quality voice synthesis
- Voices are automatically filtered based on selected language
- Audio can be played, paused, and replayed using the controls
transcribe:StartTranscriptionJobtranscribe:GetTranscriptionJobs3:GetObject(for accessing media files)s3:PutObject(if saving transcription results to S3)
translate:TranslateText
transcribe:StartStreamTranscription
transcribe:StartStreamTranscriptiontranslate:TranslateText
polly:SynthesizeSpeech
You can customize these applications with the following environment variables:
AWS_REGION: AWS region to use (default: us-east-1)AWS_S3_BUCKET: S3 bucket to store transcription results (Transcribe app only)
-
Authentication Errors: Ensure your AWS credentials are correctly configured and have the necessary permissions.
-
S3 Access Issues: Verify that your IAM user/role has access to the S3 bucket containing your media files.
-
Port Conflicts: If the ports are already in use, you can modify the
PORTconstant in each server.js file. -
CORS Issues: If accessing media from different domains, you might need to configure CORS on your S3 bucket.