This project is a simple speech-to-text application built with React and TypeScript using the Web Speech API. It leverages the SpeechRecognition interface to capture and transcribe spoken words in real-time.
- Real-time speech recognition and transcription
- Supports multiple languages (default is English)
- Simple and intuitive UI built with React
- TypeScript for type safety and scalability
Follow these steps to set up and run the project locally:
-
Clone the repository:
git clone https://github.com/yourusername/speech-recognition-app.git cd speech-recognition-app
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
.
- Upon loading the app, you'll see a button to start and stop speech recognition.
- Click "Start Recognition" and begin speaking.
- Your speech will be transcribed in real-time into the text area.
- Click "Stop Recognition" to end the transcription.
- Open the app.
- Click the Start Recognition button.
- Speak any sentence (e.g., "Hello, this is a speech recognition test").
- The spoken sentence will appear as text in the designated area.
├── public
├── src
│ ├── components
│ │ └── Main.tsx # Custom hook for speech recognition
│ ├── App.tsx # Main App component
│ ├── index.tsx # Entry point for the React app
│ ├── styles # CSS and styling files
├── package.json
├── tsconfig.json
└── README.md
- React: A JavaScript library for building user interfaces.
- TypeScript: A typed superset of JavaScript.
- SpeechRecognition API: A web API used for speech-to-text functionality.
- Material UI: A component library for a responsive and modern UI design (if applicable).
The following resources were used to build this project:
- SpeechRecognition Web API
- YouTube: Building a Speech-to-Text App in React
- YouTube: React Speech Recognition Tutorial
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to adjust the details based on your specific project setup!