curl --request POST \
--url https://waves-api.smallest.ai/api/v1/pulse/get_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'import requests
url = "https://waves-api.smallest.ai/api/v1/pulse/get_text"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: JSON.stringify('<string>')
};
fetch('https://waves-api.smallest.ai/api/v1/pulse/get_text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://waves-api.smallest.ai/api/v1/pulse/get_text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://waves-api.smallest.ai/api/v1/pulse/get_text"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://waves-api.smallest.ai/api/v1/pulse/get_text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://waves-api.smallest.ai/api/v1/pulse/get_text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"status": "success",
"transcription": "Hello world.",
"words": [
{
"start": 0,
"end": 0.5,
"speaker": "speaker_0",
"word": "Hello"
},
{
"start": 0.6,
"end": 0.9,
"speaker": "speaker_0",
"word": "world."
}
],
"utterances": [
{
"text": "Hello world.",
"start": 0,
"end": 0.9,
"speaker": "speaker_0"
}
],
"age": "adult",
"gender": "male",
"emotions": {
"happiness": 0.8,
"sadness": 0.15,
"disgust": 0.02,
"fear": 0.03,
"anger": 0.05
},
"metadata": {
"filename": "audio.mp3",
"duration": 1.7,
"fileSize": 1000000
}
}{
"error": "Invalid file format. Supported formats: audio/*"
}{
"error": "Unauthorized - Invalid API key"
}{
"error": "File size exceeds maximum limit of 25MB"
}{
"error": "Rate limit exceeded. Please try again later."
}{
"error": "Internal server error"
}Pulse (Pre-Recorded)
Convert speech to text using file upload with the Pulse STT POST API
curl --request POST \
--url https://waves-api.smallest.ai/api/v1/pulse/get_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'import requests
url = "https://waves-api.smallest.ai/api/v1/pulse/get_text"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: JSON.stringify('<string>')
};
fetch('https://waves-api.smallest.ai/api/v1/pulse/get_text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://waves-api.smallest.ai/api/v1/pulse/get_text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://waves-api.smallest.ai/api/v1/pulse/get_text"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://waves-api.smallest.ai/api/v1/pulse/get_text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://waves-api.smallest.ai/api/v1/pulse/get_text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"status": "success",
"transcription": "Hello world.",
"words": [
{
"start": 0,
"end": 0.5,
"speaker": "speaker_0",
"word": "Hello"
},
{
"start": 0.6,
"end": 0.9,
"speaker": "speaker_0",
"word": "world."
}
],
"utterances": [
{
"text": "Hello world.",
"start": 0,
"end": 0.9,
"speaker": "speaker_0"
}
],
"age": "adult",
"gender": "male",
"emotions": {
"happiness": 0.8,
"sadness": 0.15,
"disgust": 0.02,
"fear": 0.03,
"anger": 0.05
},
"metadata": {
"filename": "audio.mp3",
"duration": 1.7,
"fileSize": 1000000
}
}{
"error": "Invalid file format. Supported formats: audio/*"
}{
"error": "Unauthorized - Invalid API key"
}{
"error": "File size exceeds maximum limit of 25MB"
}{
"error": "Rate limit exceeded. Please try again later."
}{
"error": "Internal server error"
}- Raw Audio Bytes (
application/octet-stream) - Send raw audio data with all parameters as query parameters - Audio URL (
application/json) - Provide only a URL to an audio file in the JSON body, with all other parameters as query parameters
Authentication
This endpoint requires authentication using a Bearer token in the Authorization header:Authorization: Bearer YOUR_API_KEY
Input Methods
Choose the input method that best fits your use case:| Method | Content Type | Use Case | Parameters |
|---|---|---|---|
| Raw Bytes | application/octet-stream | Streaming audio data, real-time processing | Query parameters |
| Audio URL | application/json | Remote audio files, webhook processing | Query parameters |
Code Examples
Method 1: Raw Audio Bytes (application/octet-stream)
curl --request POST \
--url "https://waves-api.smallest.ai/api/v1/pulse/get_text?model=pulse&language=en&word_timestamps=true&diarize=true&age_detection=true&gender_detection=true&emotion_detection=true" \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: audio/wav' \
--data-binary '@/path/to/your/audio.wav'
import requests
url = "https://waves-api.smallest.ai/api/v1/pulse/get_text"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "audio/wav"
}
params = {
"model": "pulse",
"language": "en",
"word_timestamps": "true",
"diarize": "true",
"age_detection": "true",
"gender_detection": "true",
"emotion_detection": "true"
}
with open("path/to/your/audio.wav", "rb") as audio_file:
audio_data = audio_file.read()
response = requests.post(url, headers=headers, params=params, data=audio_data)
result = response.json()
print(f"Transcription: {result['transcription']}")
const audioFile = await fetch("/path/to/audio.wav");
const audioBuffer = await audioFile.arrayBuffer();
const params = new URLSearchParams({
model: "pulse",
language: "en",
word_timestamps: "true",
diarize: "true",
age_detection: "true",
gender_detection: "true",
emotion_detection: "true",
});
const response = await fetch(
`https://waves-api.smallest.ai/api/v1/pulse/get_text?${params}`,
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "audio/wav",
},
body: audioBuffer,
}
);
const result = await response.json();
console.log("Transcription:", result.transcription);
Method 2: Audio URL (application/json)
curl --request POST \
--url "https://waves-api.smallest.ai/api/v1/pulse/get_text?model=pulse&language=en&word_timestamps=true&diarize=true&age_detection=true&gender_detection=true&emotion_detection=true" \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/audio.mp3"
}'
import requests
import json
url = "https://waves-api.smallest.ai/api/v1/pulse/get_text"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
params = {
"model": "pulse",
"language": "en",
"word_timestamps": "true",
"diarize": "true",
"age_detection": "true",
"gender_detection": "true",
"emotion_detection": "true"
}
payload = {
"url": "https://example.com/audio.mp3"
}
response = requests.post(url, headers=headers, params=params, data=json.dumps(payload))
result = response.json()
print(f"Transcription: {result['transcription']}")
const params = new URLSearchParams({
model: "pulse",
language: "en",
word_timestamps: "true",
diarize: "true",
age_detection: "true",
gender_detection: "true",
emotion_detection: "true",
});
const payload = {
url: "https://example.com/audio.mp3",
};
const response = await fetch(
`https://waves-api.smallest.ai/api/v1/pulse/get_text?${params}`,
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
}
);
const result = await response.json();
console.log("Transcription:", result.transcription);
Supported Languages
The Pulse STT model supports automatic language detection and transcription across 30+ languages. For the full list of supported languages, please check STT Supported Languages.multi to
enable automatic language detection from the supported list. The default is
en (English).Authorizations
Bearer authentication header of the form Bearer <api_key>, where <api_key> is your api key.
Query Parameters
The ASR model to use for transcription
pulse "pulse"
Language of the audio file. Use multi for automatic language detection
it, es, en, pt, hi, de, fr, uk, ru, kn, ml, pl, mr, gu, cs, sk, te, or, nl, bn, lv, et, ro, pa, fi, sv, bg, ta, hu, da, lt, mt, multi URL to the webhook to receive the transcription results
"https://example.com/webhook"
Extra parameters to pass to the transcription. These will be added to the request body as a JSON object. Add comma separated key-value pairs to the query string. eg "custom_key:custom_value,custom_key2:custom_value2"
"custom_key:custom_value,custom_key2:custom_value2"
Whether to include word and utterance level timestamps in the response
Whether to perform speaker diarization
Whether to predict age group of the speaker
true, false Whether to predict the gender of the speaker
true, false Whether to predict speaker emotions
true, false Body
Raw audio bytes. Content-Type header should specify the audio format (e.g., audio/wav, audio/mp3). All parameters are passed as query parameters.
Response
Speech transcribed successfully
Status of the transcription request
"success"
The transcribed text from the audio file
"Hello world."
Duration of the audio file in seconds
1.7
Word-level timestamps in seconds.
Show child attributes
Show child attributes
List of utterances with start and end times
Show child attributes
Show child attributes
Predicted age group of the speaker (e.g., infant, teenager, adult, old)
infant, teenager, adult, old "adult"
Predicted gender of the speaker if requested
male, female "male"
Predicted emotions of the speaker if requested
Show child attributes
Show child attributes
Metadata about the transcription
Show child attributes
Show child attributes

