A React application that converts audio speech to text and passes it into a web service for processing.
- Convert audio speech to text using the Web Speech API.
- Translate the text into a different language using the Google Translate API.
- Generate a response to the text using the Google Generative AI API.
- Copy the response to the clipboard.
git clone https://github.com/colddsam/speech2text-converter.git
cd speech2text-converter
npm install
- Start the development server:
npm start
-
Open http://localhost:3000 in your browser.
-
Click the microphone button to start listening.
-
Speak into the microphone.
-
The text of what you said will appear in the text box.
-
Click the translate button to translate the text into a different language.
-
The translation will appear in the text box.
-
Click the send button to generate a response to the text.
-
The response will appear in the text box.
-
Click the copy button to copy the response to the clipboard.
The application uses the Web Speech API to convert audio speech to text. The text is then translated into a different language using the Google Translate API. The translation is then passed to the Google Generative AI API to generate a response. The response is then displayed in the text box and can be copied to the clipboard.
The main component of the application. It renders the user interface and handles the state of the application.
- The
handleStartListening
function starts listening for audio input. - The
handleStopListening
function stops listening for audio input. - The
handleTranslateVoice
function translates the audio input into text. - The
handleTranslateText
function translates the text into a different language. - The
GenRes
function generates a response to the text. - The
handleCopy
function copies the text to the clipboard.
A component that renders a button that displays a tooltip when hovered over.
- The
setCurrentLanguage
function sets the current language of the application.
A component that generates a response to the text using the Google Generative AI API.
- The
GenRes
function generates the response.
Contributions are welcome! Please read the contributing guidelines before submitting a pull request.
This project is licensed under the MIT License.