Gladia empowers developers and businesses with a comprehensive Audio Intelligence API, designed to extract valuable insights from audio and video data. Their cloud-based API leverages cutting-edge AI models to perform a range of tasks, including:

  • High-Accuracy Speech-to-Text Transcription: Convert audio and video into text transcripts in real-time or asynchronously.
  • Multilingual Support: Transcribe and translate speech across a vast number of languages with automatic language detection and code-switching capabilities.
  • Speaker Separation: Identify and distinguish individual speakers within an audio recording.
  • Audio Analysis and Summarization: Gain insights from audio data using sentiment analysis, keyword spotting, and audio search functionalities.

Authentication:

Gladia utilizes API keys for authentication. You can obtain your free API key by creating an account on the Gladia platform.

Here's a breakdown of some key Gladia Text API endpoints along with JavaScript example code snippets for each:

1. Real-time Speech-to-Text Transcription (Streaming Transcription)

  • This endpoint allows real-time transcription of audio data streamed from a microphone or uploaded file.
  • Type: WebSocket
  • JavaScript Example: (Note: Requires additional browser libraries for WebSocket functionality)

Please refer to Gladia's documentation for detailed instructions and code samples on implementing real-time transcription using WebSockets.

2. Asynchronous Speech-to-Text Transcription (Transcription)

  • This endpoint transcribes audio data asynchronously, returning results after processing.
  • Type: POST
  • JavaScript Example:
const apiKey = 'YOUR_API_KEY';
const url = 'https://api.gladia.io/v1/transcribe';

const data = {
    audio: {
        url: 'https://www.example.com/audio.mp3', // Replace with your audio URL
    },
    language: 'en_US', // Change language code as needed
    speaker_diarization: true, // Enable speaker separation (optional)
};

const headers = {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
};

fetch(url, { method: 'POST', headers, body: JSON.stringify(data) })
    .then((response) => response.json())
    .then((data) => {
        console.log('Speech Transcript:', data.text);
        if (data.speaker_diarization) {
            console.log('Speakers:', data.speakers);
        }
    })
    .catch((error) => console.error(error));

3. Audio Analysis (Analyze) (Paid Plans)

  • This endpoint analyzes audio data for sentiment, keywords, and other characteristics.
  • Type: POST
  • JavaScript Example: (Note: Not possible with free API key)

Explore More with Gladia

Gladia offers a free tier with limited usage, along with paid plans that unlock additional features and functionalities. Explore their comprehensive documentation to delve deeper into each API endpoint, advanced functionalities, and pricing options. Leverage Gladia's Audio Intelligence API to unlock the power of your audio and video data and gain valuable insights for your applications.