How dheyyu/text-to-speech-application works
This is a serverless text-to-speech narrator. A user enters text and selects a voice in the frontend; it submits them to the configured API endpoint, and the Lambda handler validates the request, asks Polly to synthesize speech, stores the MP3 in S3, and returns a temporary audio URL for playback or download. Terraform provisions the documented Lambda, S3 bucket, and IAM role. The Lambda and frontend behavior is supported by excerpts; infrastructure details and the API Gateway-to-Lambda wiring are documented or inferred only at a high level.
Main entry points: lambda_function.py Request handler · main.tf Resource provisioning · script.js Narrator UI
Components 8
User interface
- Narrator UI
frontend/script.js
Speech generation
- Request handler
lambda/lambda_function.py
Cloud infrastructure
- Resource provisioning
infra/main.tf - Frontend infrastructure
infra/frontend.tf
Other components
- User
- API endpoint
- Amazon Polly
- Audio bucket
Connections 8
- User → Narrator UI: enters text
frontend/script.js - Narrator UI → API endpoint: submits request
frontend/script.js - API endpoint → Request handler: invokes
- Request handler → Amazon Polly: synthesizes speech
lambda/lambda_function.py - Request handler → Audio bucket: uploads audio
lambda/lambda_function.py - Request handler → API endpoint: returns audio URL
lambda/lambda_function.py - Resource provisioning → Request handler: provisions
README.md - Resource provisioning → Audio bucket: provisions
README.md