Skip to content

About

A modern Text-to-Speech web app built with pure HTML, CSS, and JavaScript. Features real-time control of pitch, speed, and volume, multiple repeat modes, segmented playback, and full browser voice support using the Web Speech API. No backend required — lightweight, responsive, and runs entirely in the browser.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Text-to-Speech Web App 🎙️ | Real-Time Voice Controls | HTML • CSS • JavaScript

Made with HTML Made with CSS Made with JavaScript License: MIT Status

A clean, modern, fully client-side Text-to-Speech (TTS) web application built using pure HTML, CSS and JavaScript, featuring real-time control of speech speed, pitch, and volume, plus loop modes, segmented playback, and a smooth, responsive UI.

No backend. No frameworks. No dependencies.
Just open index.html and run it.


🚀 Key Features

🎧 Real-Time Speech Controls

Change the speed, pitch, or volume while audio is actively speaking — seamlessly and asynchronously.

🔁 Smart Repeat Modes

Choose from:

  • Play once
  • Repeat 3×
  • Repeat 5×
  • Infinite loop mode

✂️ Smart Text Segmentation

Long text is auto-split into smaller segments to avoid Web Speech API limits and prevent audio glitches.

🎙️ Voice Selection

Auto-loads all available voices from your browser (Google, Microsoft, OS voices, etc.).

🖥️ Fully Responsive UI

Looks clean and modern across:

  • Desktop
  • Tablet
  • Mobile

⚡ No Frameworks — Lightweight

No React, no backend, no server, no NPM.
Everything runs directly in the browser.


🧰 Tech Stack

  • HTML5 — UI layout
  • CSS3 — Responsive styling
  • JavaScript (ES6) — Full TTS engine + controls
  • Web Speech API (speechSynthesis)

📁 Project Structure

Text-to-Speech/
│
├── index.html          # Main application UI
├── style.css           # All styling and layout
├── logic.js            # Core TTS engine and logic
├── manifest.json       # Optional PWA metadata
├── projlogo.png        # App icon/logo
└── README.md           # Documentation

🔧 Getting Started

1. Clone the Repository

git clone https://github.com/Dev-Suraj-Dhawal/Text-to-Speech.git

2. Run the App

Simply open:

index.html

or run any simple local server:

npx serve .

🛠️ How to Use

  1. Type or paste text in the textarea
  2. Select a voice
  3. Adjust:
    • Speed
    • Pitch
    • Volume
  4. Choose playback mode:
    • Play
    • Repeat 3×
    • Repeat 5×
    • Loop
  5. Pause, Resume, or Stop anytime

The app updates all controls in real time with zero lag.


🌐 Browser Compatibility

Browser Supported Notes
Chrome ✔️ Best performance
Edge ✔️ Smooth voice support
Firefox ⚠️ Limited support for some voices
Safari ✔️ Works well on Mac & iOS
Opera ✔️ Works

🔍 Known Limitations

These limits are from the Web Speech API, not the app:

  • Cannot export audio directly (requires backend TTS engines)
  • Available voices vary by OS and browser
  • Rapid start/stop may trigger SpeechSynthesisError: interrupted

Your logic.js already handles interruptions safely.


🚧 Planned Enhancements (Optional Roadmap)

  • Dark mode
  • Voice presets (e.g., “Narration”, “Podcast”, “Motivation”)
  • Save & export text history
  • Audio recording using MediaRecorder + external TTS engines

🤝 Contributing

Anyone is welcome to submit issues, feature requests, or enhancements.
Feel free to improve UI/UX, add animations, or extend functionality.


📜 License

This project is licensed under the MIT License — free for personal and commercial use.


⭐ Support the Project

If you find this useful, consider:

  • Starring the repository
  • Sharing it
  • Forking it for your portfolio

Your support fuels more open-source projects.


🎯 Final Summary

This Text-to-Speech project demonstrates a complete, production-ready TTS tool built with pure frontend technologies.
It delivers smooth performance, real-time controls, and robust handling of long text — all in a lightweight package.

Perfect for:

  • Portfolio projects
  • Accessibility tools
  • Learning the Web Speech API
  • Browser-based productivity apps

About

A modern Text-to-Speech web app built with pure HTML, CSS, and JavaScript. Features real-time control of pitch, speed, and volume, multiple repeat modes, segmented playback, and full browser voice support using the Web Speech API. No backend required — lightweight, responsive, and runs entirely in the browser.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages