Sarvam Audio Processor icon

Sarvam Audio Processor

Processes audio files using Sarvam API and Azure Data Lake

Sarvam Audio Processor

AI-generated

Overview

The Sarvam Audio Processor node processes audio files by leveraging the Sarvam API combined with Azure Data Lake storage. It is designed to transcribe speech from audio inputs into text using Sarvam's speech-to-text translation service.

Typical use cases include:

  • Transcribing recorded meetings, interviews, or podcasts.
  • Converting voice notes or audio messages into searchable text.
  • Automating subtitle generation for videos.

For example, a user can input an audio file (e.g., an MP3 recording) into this node, which uploads the file to Azure storage, triggers a transcription job on Sarvam’s API, waits for completion, and then outputs the transcription result as JSON.

Properties

Name Meaning
API Key Sarvam API subscription key required to authenticate requests to the Sarvam speech-to-text service.

Output

The node outputs an array with one item per input audio file processed. Each output item contains a json object with the following structure:

  • job_id: The unique identifier of the transcription job created on Sarvam.
  • result: The transcription result returned by Sarvam, parsed as JSON. This typically includes the transcribed text along with additional metadata such as diarization (speaker separation) and timestamps.

No binary data is output by this node; all results are provided in JSON format.

Dependencies

  • Sarvam API: Requires a valid API subscription key to access the speech-to-text translation endpoints.
  • Azure Data Lake Storage: Used as temporary storage for uploading input audio files and downloading transcription results.
  • Axios HTTP client: For making REST API calls to Sarvam and Azure services.
  • n8n environment must provide network access to both Sarvam API endpoints (https://api.sarvam.ai) and Azure Blob Storage URLs.

Troubleshooting

  • Missing API Key: The node will throw an error if the API key property is empty. Ensure you provide a valid Sarvam API subscription key.
  • No Binary Data Found: If the input item does not contain binary data under the property named "data", the node will fail. Confirm that the input contains properly named binary audio data.
  • Upload Failures: Errors during upload to Azure Blob Storage will report HTTP status codes and messages. Check your Azure storage permissions and network connectivity.
  • Job Initialization or Start Failures: If Sarvam API returns errors when initializing or starting the transcription job, verify the API key validity and quota limits.
  • Timeouts: The node polls the job status up to 30 times with delays. If the job does not complete within this timeframe, a timeout error occurs. Consider increasing timeout settings or checking Sarvam service status.
  • Invalid or Empty Result File: If the downloaded transcription result is empty or cannot be parsed as JSON, the node throws an error. This may indicate issues with the Azure storage path or Sarvam processing.

Links and References

Discussion