Skip to content

llirikkcoder/llm-stt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speech to Spanish Translator

Web application for recording audio, transcribing speech (STT) and translating to Spanish.

Features

  • 🎤 Audio recording from microphone
  • 🗣️ Speech-to-text using OpenAI Whisper
  • 🌍 Translation to Spanish using GPT
  • ⚡ Real-time processing
  • 🎨 Modern React interface

Tech Stack

  • Frontend: React + TypeScript + Vite
  • Backend: Node.js + Express + TypeScript
  • AI: OpenAI API (Whisper + GPT)

Prerequisites

  • Node.js 18+
  • OpenAI API key

Installation

1. Clone repository

git clone <repository-url>
cd llm-stt

2. Backend Setup

cd backend
npm install
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

3. Frontend Setup

cd ../frontend
npm install

Running the Application

Start Backend (Terminal 1)

cd backend
npm run dev
# Server runs on http://localhost:5000

Start Frontend (Terminal 2)

cd frontend
npm run dev
# App opens on http://localhost:5173

Usage

  1. Open http://localhost:5173 in browser
  2. Click "Start Recording"
  3. Speak in Russian
  4. Click "Stop Recording"
  5. Wait for transcription and translation
  6. View results: original text and Spanish translation

API Endpoints

  • POST /api/transcribe - Process audio file
    • Input: audio file (multipart/form-data)
    • Output: { originalText, translatedText }
  • GET /health - Health check

Project Structure

llm-stt/
├── frontend/           # React application
│   ├── src/
│   │   ├── components/
│   │   │   ├── AudioRecorder.tsx
│   │   │   └── TranslationDisplay.tsx
│   │   └── App.tsx
├── backend/           # Node.js API
│   ├── src/
│   │   └── index.ts
│   └── .env.example
└── README.md

Environment Variables

Backend (.env):

  • OPENAI_API_KEY - Your OpenAI API key
  • PORT - Server port (default: 5000)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published