Skip to content

salatech/sptt

Repository files navigation

Speech-to-Text App

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.

Table of Contents

Features

  • 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.

Screenshots

Screenshot

Installation

Prerequisites

Steps

  1. Clone the repository:
    git clone https://github.com/yourusername/speech-to-text-app.git
  2. Navigate to the project directory:
    cd speech-to-text-app
  3. Install the dependencies:
    npm install
  4. Start the app:
    npx expo start

Usage

  1. Open the app in your emulator or on a physical device.
  2. Press the microphone icon to start recording.
  3. Press the microphone icon again to stop recording.
  4. View the mock transcription displayed in the text area.
  5. Toggle between WebSocket and gRPC (mock feature).

Code Overview

Components

  • SpeechToTextApp: The main component that handles recording, transcription, and UI.

Important Functions

  • 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).

Dependencies

Future Improvements

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors