Skip to content

sukets16/deepgram-barebones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepgram Real-time Transcription

A real-time speech-to-text application using Deepgram's live transcription API with WebSocket support.

Features

  • Real-time speech transcription
  • WebSocket communication for live audio streaming
  • Support for multiple languages and models
  • Smart formatting and punctuation
  • Speaker diarization
  • Custom keyword detection for specific terms

Prerequisites

  • Node.js (v14 or higher)
  • Deepgram API key

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd deepgram-test
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your Deepgram API key:
DEEPGRAM_API_KEY=your_deepgram_api_key_here

Usage

  1. Start the server:
node index.js
  1. Open your browser and navigate to http://localhost:3000

  2. Click the "Start Recording" button to begin real-time transcription

Configuration

The application supports various Deepgram features:

  • Model: Choose from different Deepgram models
  • Language: Supports multiple languages (default: en-US)
  • Smart Formatting: Automatically formats numbers, dates, and punctuation
  • Diarization: Identifies different speakers
  • Custom Keywords: Detects specific terms like "Pinn", "Dr. Pinnamaneni", etc.

API Endpoints

  • GET / - Serves the main application page
  • WebSocket / - Handles real-time audio streaming and transcription

WebSocket Messages

Client to Server:

  • { type: "start", model: "nova-2", language: "en-US", smart_format: true } - Start transcription
  • { type: "audio", audio: "base64_encoded_audio" } - Send audio data
  • { type: "stop" } - Stop transcription

Server to Client:

  • Transcription results from Deepgram API

Environment Variables

  • DEEPGRAM_API_KEY - Your Deepgram API key (required)

Dependencies

  • @deepgram/sdk - Deepgram SDK for Node.js
  • express - Web framework
  • ws - WebSocket library
  • dotenv - Environment variable management

License

ISC

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors