Overview
I built this proof of concept shortly after ChatGPT launched to explore how a conversational model could work with AWS speech services. The assistant records a spoken question, detects its language, asks ChatGPT for an answer and converts the response back into speech in the same language.
The project connects several independently useful services into one end-to-end voice experience. Python coordinates the workflow, Amazon S3 holds the intermediate audio, Amazon Transcribe handles speech recognition and language detection, and Amazon Polly generates the spoken response.
End-to-end flow
- Record a question and save it as a WAV file.
- Upload the recording to Amazon S3.
- Start an Amazon Transcribe job for the uploaded audio.
- Retrieve the transcript and detected language.
- Send the transcript to ChatGPT.
- Prepare the response for speech synthesis, removing code blocks when necessary.
- Select an Amazon Polly voice for the detected language and generate an MP3 file.
- Play the generated answer.
Multilingual behavior
Amazon Transcribe identifies the language directly from the recording. The original implementation maps supported English, Spanish and Catalan language codes to corresponding Amazon Polly voices. This lets the same workflow accept a question and return the answer without requiring the user to choose a language first.
Why I built it
The experiment was a practical way to test orchestration across generative AI, speech recognition, object storage and speech synthesis. It also showed how cloud services can provide the surrounding capabilities that turn a text-based model into a voice interface.
Source and walkthrough
The GitHub repository contains the Python proof of concept. The accompanying AWS Community Builders article documents the original implementation step by step, including recording audio, configuring the AWS services and running the complete workflow.
Historical implementation note
This project captures a 2022 experiment and reflects the ChatGPT integrations available at that time. Treat the repository as a learning artifact rather than current production guidance. A new implementation should use supported OpenAI APIs, current AWS SDK patterns, least-privilege IAM permissions and credentials supplied through environment configuration or short-lived roles rather than source code.
