A real-time speech-to-text application using Deepgram's live transcription API with WebSocket support.
- 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
- Node.js (v14 or higher)
- Deepgram API key
- Clone the repository:
git clone <your-repo-url>
cd deepgram-test- Install dependencies:
npm install- Create a
.envfile in the root directory and add your Deepgram API key:
DEEPGRAM_API_KEY=your_deepgram_api_key_here- Start the server:
node index.js-
Open your browser and navigate to
http://localhost:3000 -
Click the "Start Recording" button to begin real-time transcription
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.
GET /- Serves the main application pageWebSocket /- Handles real-time audio streaming and transcription
{ 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
- Transcription results from Deepgram API
DEEPGRAM_API_KEY- Your Deepgram API key (required)
@deepgram/sdk- Deepgram SDK for Node.jsexpress- Web frameworkws- WebSocket librarydotenv- Environment variable management
ISC
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request