Speech to Text

Edgen AI Speech-to-Text SDK

The Edgen AI Speech-to-Text SDK is a cutting-edge solution for real-time transcription that transforms audio into text with lightning-fast speed and high accuracy. Designed for both English and Spanish, it delivers exceptional performance under optimal conditions, achieving up to 98% accuracy in less than 400 ms.


Key Features

  • High Accuracy: Achieves up to 98% transcription accuracy in ideal conditions.
  • Multilingual Support: Currently supports English and Spanish.
  • Real-Time Processing: Returns transcriptions in under 400 ms.
  • Simple Integration: Easily integrate with Node.js and other modern tech stacks.

Getting Started

Setting Up the Client

To get started, install the EdgenAI library and use it to configure the client:

import EdgenAI from 'edgenai'; 
import fs from 'fs';
 
// Initialize the EdgenAI client with your API key
const client = new EdgenAI({
    apiKey: 'YOUR_API_KEY'
});
 

Transcribing Audio Files

Here’s an example of how to transcribe audio using the SDK:

async function transcribeAudio() {
    // Read the audio file
    const audio = fs.readFileSync('path/to/audio/file.wav');
 
    // Transcribe the audio file
    const response = await client.speechToText.transcribe(audio);
 
    // Log the transcription
    console.log("Transcription:", response.text);
}
 
transcribeAudio();

By default, the SDK returns the transcription as a JSON object with the following structure:

{
    "text": "the transcribed text"
}

Errors

Here is an example of an error response:

{
    "status": [300-500],
    "error": "Issue with transcription"
}