TTS & Translate App | Serverless Functions, Google Translate & Web Speech API @TraversyMedia
TTS & Translate App | Serverless Functions, Google Translate & Web Speech API  @TraversyMedia
Uploaded January 2025 | Updated September 2026, 2 weeks ago
We will build a JavaScript web app that takes in some text and does TTS as well as the option to select a language to translate to. We will use the Vercel CLI and a serverless function fot the translation and API KEY security. Tailwind CSS for styling.

Final Code:
github.com/bradtraversy/tts-translate

For more Vanilla JS projects, check out these courses:

20 Vanilla JS Projects:
traversymedia.com/20-Vanilla-JavaScript-Projects

Modern JS From the Beginning:
traversymedia.com/modern-javascript-2-0

50 Projects In 50 Days:
traversymedia.com/50-Projects-In-50-Days

Timestamps:
0:00 - Intro
2:22 - Project Structure
4:38 - HTML & Tailwind Classes
8:32 - Web Speech API & TTS
11:10 - Get Voices
16:20 - Language Selection
20:06 - Google Translate API Key Setup
21:29 - Vercel CLI Setup
23:57 - Creating a Serverless Function
26:57 - dotenv Setup
29:22 - Google Translate API Request
32:58 - Test Function With Postman
34:18 - Make Request To Serverless Function Endpoint
38:39 - Translate Text & Play TTS
43:21 - Deploy To Vercel
TTS & Translate App | Serverless Functions, Google Translate & Web Speech APIBuild & Deploy An AI-Powered Chat App | Vue, Node, TypeScript,  Open AI, Stream & Neon DatabaseVue.js Crash CourseWeb Development In 2021 - A Practical GuideWhy I stopped making coding tutorialsA lot of you NEED to hear thisI Used to Hate TypescriptReact Native Crash Course 2026 - Build a Complete Mobile AppUltimate Guide To Web Scraping - Node.js & Python (Puppeteer & Beautiful Soup)Build Strength From Struggle | My StoryAstro Quick Start Course | Build an SSR BlogNext.js 13 Crash Course | App Directory, React Server Components & More
Traversy Media |

TTS & Translate App | Serverless Functions, Google Translate & Web Speech API

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER