Latest (v1.5.2)

Changelog

  • 06.06.2025 - 1.5.2 [STT] Added AI summary of stt transcriptions

  • 29.12.2024 - 1.5.1 [STT] Added known_speakers to assign a speaker name based on embedding similarity from diarization pipeline, and added possible_hallucination boolean to indicate if the model might be hallucinating

API prefix: https://neura.al/api/v1.5

Speech to text

POST /stt

Submit a speech-to-text transcription request.

Headers

Name
Value

Content-Type

multipart/form-data

Authentication

Bearer your_api_key

Body

Name
Type
Description
Optional

audio

file

The content of the audio to be transcribed

callback_url

url

URL to be called once status changes

callback_info_only

boolean

Weather to return just the callbackID and status to callback_url

word_timestamps

boolean

Weather to include timestamps for each word

known_speaker_*

file

For each speaker you know, provide

summary

boolean

Weather to summarise the transcription content

Response

{
    "callbackID": "ID of the callback" 
}

Example

const axios = require('axios');
const fs = require('fs');

const apiPrefix = process.env.NEURA_API_PREFIX;
const apiKey = process.env.NEURA_API_KEY;

const url = `${apiPrefix}/stt`;
const audioFile = fs.createReadStream('path/to/audio/file');

const formData = new FormData();
formData.append('audio', audioFile);
formData.append('callback_url', 'https://example.com/callback');
formData.append('callback_info_only', true);
formData.append('word_timestamps', true);

axios.post(url, formData, {
  headers: {
    'Authorization': `Bearer ${apiKey}`
  }
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });

Text to speech

POST /tts

Submit a text-to-speech request

Headers

Name
Value

Content-Type

application/json

Authentication

Bearer your_api_key

Body

Name
Type
Description
Optional

text

string

The text you want to convert to speech

speaker

ENUM ['f1', f2', 'f3', 'f4', 'm1', 'm2', 'm3', 'm4']

The speaker you want to use

callback_url

url

URL to be called once status changes

callback_info_only

boolean

Weather to return just the callbackID and status to callback_url

Response

{
    "callbackID": "ID of the callback" 
}

Example

const axios = require('axios');

const apiPrefix = process.env.NEURA_API_PREFIX;
const apiKey = process.env.NEURA_API_KEY;

const url = `${apiPrefix}/tts`;
const data = {
  text: 'The text you want to convert to speech',
  speaker: 'f1',
  callback_url: 'https://example.com/callback',
  callback_info_only: true
};

axios.post(url, data, {
  headers: {
    'Authorization': `Bearer ${apiKey}`
  }
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });

Callback status

GET /callback/status

Check the result of a specific callback

Headers

Name
Value

Content-Type

application/json

Authentication

Bearer your_api_key

Parameters

Name
Type
Description
Optional

callbackId

string

Callback ID to be checked

result_as

ENUM ["json", "txt","srt", "srt_words"]

How to format the response for Speech to text: “json” → returns a json element

“txt” → returns a txt element

“srt” → returns a srt compatible file with segments

“srt_words” → returns a srt compatible file with each word as a segment

Response

{
    "status": ENUM["done","processing","failed"],
    "data": "response if status is done"
}

Example

const axios = require('axios');

const apiPrefix = process.env.NEURA_API_PREFIX;
const apiKey = process.env.NEURA_API_KEY;
const callbackId = 'your_callback_id';

const url = `${apiPrefix}/callback/status?callbackId=${callbackId}`;

axios.get(url, {
  headers: {
    Authorization: `Bearer ${apiKey}`
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});

List

GET /list

List the operations performed in the API

Headers

Name
Value

Content-Type

application/json

Parameters

Name
Type
Description
Optional

keyId

string

Your API key

count

integer

Number of elements to retrieve

status

ENUM ["processing", "success", "failed"]

Filter by status of the requests

type

ENUM ["stt-api", "tts-api"]

Filter by type of request

include_body

boolean

Weather to return the response (Default = false)

Response

[
    {
        "id": "callbackId",
        "type": "tts-api",
        "status": 1
    },
    ... 
    {
        "id": "callbackId",
        "type": "stt-api",
        "status": 0
    },
]

Example

const axios = require('axios');

const apiPrefix = process.env.NEURA_API_PREFIX;
const apiKey = process.env.NEURA_API_KEY;
const includeBody = true;
const count = 10;
const status = 'success';
const type = 'stt-api';

const url = `${apiPrefix}/list?keyId=${apiKey}&count=${count}&status=${status}&type=${type}&include_body=${includeBody}`;

axios.get(url)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });

User quota

GET /user/quota

Returns the quota left in the account

Headers

Name
Value

Content-Type

application/json

Authentication

Bearer your_api_key

Response

[
    {
        "stt": number_of_seconds_left,
        "tts": number_of_words_left
    },
]

Example

const axios = require('axios');

const apiPrefix = process.env.NEURA_API_PREFIX;
const apiKey = process.env.NEURA_API_KEY;

const url = `${apiPrefix}/user/quota`;

axios.get(url)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });

Last updated

Was this helpful?