Speech to Text
Convert audio and video content into accurate text transcriptions.
Try it out
Test the Speech to Text API directly in your browser with our interactive playground.
Overview
The Speech to Text API accepts audio or video files and returns transcribed text. It supports multiple languages and provides high accuracy even with background noise.
API Reference
Endpoint
POST https://api.tryvinci.com/vincistt
Headers
Name | Type | Description |
---|---|---|
X-User-ID | string | Required. Your user ID |
Request Body
Multipart form data with:
Parameter | Type | Description |
---|---|---|
file | File | Audio/video file to transcribe |
Response
{
text: string // Transcribed text
}
Code Examples
- Python
- JavaScript
import requests
url = "https://api.tryvinci.com/vincistt"
headers = {"X-User-ID": "your-user-id"}
files = {"file": open("video.mp4", "rb")}
response = requests.post(url, headers=headers, files=files)
print(response.json()["text"])
const formData = new FormData();
formData.append('file', videoFile);
const response = await fetch('https://api.tryvinci.com/vincistt', {
method: 'POST',
headers: {
'X-User-ID': 'your-user-id',
},
body: formData,
});
const data = await response.json();
console.log(data.text);
Best Practices
File Format Support
Supported formats include MP3, WAV, MP4, and MOV. For best results, ensure good audio quality.
Language Detection
The API automatically detects the spoken language. No need to specify the language parameter.
Error Handling
Always implement proper error handling to manage rate limits and potential API errors.
Optimization
For large files, consider splitting them into smaller segments (30-60 seconds) for better performance.