Voice2Code is an AI-powered web app that lets you convert voice commands into fully functional HTML, CSS, and JavaScript code in real time no typing, no delay, just speak and build.
Imagine coding without touching the keyboard. Just say:
π£οΈ βCreate a centered login form with two input fields and a submit buttonβ
And boom π₯ the code appears instantly.
Voice2Code uses:
- Real-time speech recognition
- OpenAI's powerful code generation
- A simple web interface
To turn your voice into front-end code like magic β¨
β
Real-time speech-to-code generation
β
OpenAI Codex/GPT integration
β
HTML/CSS/JS code output
β
Copy button to grab code instantly
β
Fully responsive design-ready layout
β
Built using Node.js, Express, HTML, JS
(Coming Soon: Live GIF demo of speaking β code)
| Layer | Technology Used |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Node.js, Express |
| AI Engine | OpenAI GPT (text-davinci-003) |
| Voice | Web Speech API (JavaScript) |
| Styling | Custom CSS (Tailwind optional) |
voice2code/
βββ public/
β βββ index.html
β βββ style.css
β βββ script.js
βββ server/
β βββ server.js
βββ .env
βββ package.json
βββ README.md
- Clone the Repository
git clone https://github.com/your-username/voice2code.git
cd voice2code- Install Backend Dependencies
npm install- Create a
.envFile
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Run the Server
node server/server.js- Open the App
Just open
public/index.htmlin your browser and click ποΈ
Say something like βCreate a red button that says Subscribeβ β your code will appear instantly!
Try saying:
- βCreate a responsive navbar with three linksβ
- βAdd a dark theme background and a login cardβ
- βMake a centered contact form with name, email, and message fieldsβ
- βDesign a heading and a paragraph with padding and marginsβ
- Syntax highlighting with Prism.js
- Code export/download as
.html - UI redesign using Tailwind or Bootstrap
- Multi-language speech recognition
- React version for developers
- Live deployed demo link
This tool makes front-end prototyping faster and more accessible.
Whether you're a beginner, a rapid prototyper, or just curious about voice + AI, Voice2Code brings something rare and powerful to the table.
Want to contribute to this voice+AI revolution?
Pull requests are welcome! π₯
You can:
- Improve UI
- Add backend enhancements
- Suggest better prompt engineering
- Submit bug fixes
If you love the idea of coding with your voice, donβt forget to β this repository.
Letβs build the future of voice-driven coding together!
Made with π» + π§ + ποΈ
by Ayesha