A modern React application with real-time speech recognition capabilities, built with TypeScript and Chakra UI. This app allows users to convert spoken words into text with support for multiple languages and customizable transcript styling.
- Real-time Speech Recognition: Convert speech to text in real-time
- Multi-language Support: Support for 10+ languages including English, French, Italian, Japanese, Korean, Chinese, and more
- Customizable UI: Adjust font size and weight of transcriptions
- Copy to Clipboard: Easy one-click copying of transcribed text
- Browser Compatibility Check: Automatic detection of browser speech recognition support
- Debug Panel: Built-in troubleshooting tools for development
- Responsive Design: Works on desktop and mobile devices
- Modern Tech Stack: Built with React 18, TypeScript, and Vite
- ๐บ๐ธ English (en-US)
- ๐ซ๐ท French (fr-FR)
- ๐ฎ๐น Italian (it-IT)
- ๐ฏ๐ต Japanese (ja)
- ๐ฐ๐ท Korean (ko)
- ๐ท๐ด Latin (la)
- ๐จ๐ณ Chinese (zh-CN)
- ๐ฒ๐พ Malaysian (ms-MY)
- ๐ต๐น Portuguese (pt-PT)
- ๐ช๐ธ Spanish (es-US)
- Frontend Framework: React 18.2.0
- Language: TypeScript 5.0.2
- Build Tool: Vite 7.1.3
- UI Library: Chakra UI 2.8.0
- Speech Recognition: react-speech-recognition 3.10.0
- Animations: Framer Motion 10.16.1
- Icons: React Icons 4.10.1
- Styling: Emotion (CSS-in-JS)
This app requires a modern browser with Web Speech API support:
- Chrome/Chromium: 33+ (Recommended)
- Microsoft Edge: 79+
- Opera: 20+
- Samsung Internet: 4.0+
- Safari: 14.1+ (macOS/iOS - requires user interaction)
- Firefox: Limited support, experimental features need to be enabled
- Internet Explorer (all versions)
- Older browser versions
- Node.js: 16.0.0 or higher
- npm: 7.0.0 or higher (or yarn/pnpm equivalent)
- Operating System: Windows 10+, macOS 10.15+, or Linux
https://domainslocalhost(for development)
git clone https://github.com/RedDotz20/speech-to-text-recognition.git
cd speech-to-text-recognitionUsing npm:
npm installUsing yarn:
yarn installUsing pnpm:
pnpm installStart the development server:
npm run devThe app will be available at http://localhost:5173
Create a production build:
npm run buildPreview the production build:
npm run previewspeech-to-text-recognition/
โโโ public/ # Static assets
โ โโโ vite.svg
โโโ src/
โ โโโ assets/ # Images, flags, icons
โ โโโ components/ # React components
โ โ โโโ MainControls/ # Control panel components
โ โ โโโ DebugPanel.tsx
โ โ โโโ SimpleSpeechTest.tsx
โ โ โโโ SpeechRecognitionTroubleshoot.tsx
โ โ โโโ Transcription.tsx
โ โโโ constants/ # App constants
โ โ โโโ languageSupport.ts
โ โโโ context/ # React contexts
โ โ โโโ LanguageContext.tsx
โ โ โโโ SpeechRecognitionContext.tsx
โ โ โโโ TranscriptContext.tsx
โ โโโ hooks/ # Custom hooks
โ โ โโโ useLanguageContext.ts
โ โ โโโ useSpeechRecognitionContext.ts
โ โ โโโ useTranscriptContext.ts
โ โ โโโ index.ts
โ โโโ types/ # TypeScript type definitions
โ โ โโโ languageContextType.ts
โ โ โโโ languageTypes.ts
โ โ โโโ speechRecognitionContextType.ts
โ โ โโโ transcriptContextType.ts
โ โโโ App.tsx # Main app component
โ โโโ main.tsx # App entry point
โ โโโ index.css # Global styles
โโโ package.json
โโโ tsconfig.json
โโโ vite.config.ts
โโโ README.md
- Grant Microphone Permission: Click "Allow" when prompted for microphone access
- Select Language: Choose your preferred language from the dropdown
- Start Recording: Click the microphone button to start speech recognition
- Speak Clearly: Talk into your microphone
- View Transcript: Your speech will appear as text in real-time
- Copy Text: Click the copy button to copy the transcribed text
- Font Weight: Adjust the text weight (Thin, Normal, Medium, Bold)
- Font Size: Choose from different text sizes (sm, md, lg, xl)
- Language: Switch between 10+ supported languages
-
Microphone Not Working
- Ensure microphone permissions are granted
- Check if other applications are using the microphone
- Try refreshing the page
-
Speech Not Recognized
- Speak clearly and at a moderate pace
- Ensure you're in a quiet environment
- Check if the selected language matches your speech
-
Browser Not Supported
- Use a Chromium-based browser (Chrome, Edge, Opera)
- Update your browser to the latest version
- Enable experimental features in Firefox
-
HTTPS Issues in Production
- Deploy to HTTPS domain
- Use services like Netlify, Vercel, or GitHub Pages
The app includes a built-in debug panel that shows:
- Browser compatibility status
- Microphone access status
- Current transcript state
- Technical information
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm start- Build and preview (production mode)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- react-speech-recognition - React hook for speech recognition
- Chakra UI - Modular and accessible component library
- Web Speech API - Browser speech recognition API
If you encounter any issues or have questions:
- Check the troubleshooting section
- Look at existing issues
- Create a new issue with detailed information
Made with โค๏ธ by RedDotz20