A React Native application that allows users to convert speech to text using the device's microphone. The app utilizes expo-av for audio recording and includes mock functionality for transcription.
- Audio Recording: Records audio through the device's microphone.
- Speech Transcription: Displays a placeholder transcript (mock transcription).
- Switch between WebSocket and gRPC: Mock feature to toggle connection type.
- UI Feedback: Displays an activity indicator while loading and shows a snackbar message for recording start/stop.
- Node.js
- Expo CLI
- React Native environment setup (Guide for setting up React Native)
- Clone the repository:
git clone https://github.com/yourusername/speech-to-text-app.git
- Navigate to the project directory:
cd speech-to-text-app - Install the dependencies:
npm install
- Start the app:
npx expo start
- Open the app in your emulator or on a physical device.
- Press the microphone icon to start recording.
- Press the microphone icon again to stop recording.
- View the mock transcription displayed in the text area.
- Toggle between WebSocket and gRPC (mock feature).
- SpeechToTextApp: The main component that handles recording, transcription, and UI.
startRecording: Requests microphone permissions, sets up recording configuration, and starts recording audio.stopRecording: Stops the audio recording and sets a mock transcription result.toggleConnectionType: Switches between WebSocket and gRPC (for future backend integration).
- React Native - A framework for building native apps using React.
- expo-av - Expo library for audio and video playback and recording.
- react-native-paper - Material Design library for React Native.
- @expo/vector-icons - Icon library for Expo projects.
- Implement actual transcription functionality using a third-party speech-to-text API.
- Enhance error handling for various edge cases during recording.
- Add a settings screen to configure recording options.