Skip to Content
GuidesUploading Recordings

Uploading Recordings

This guide covers best practices for uploading audio recordings to the IdentityCall API.

Supported Formats

FormatExtensionMax SizeNotes
MP3.mp3100 MBMost common, good compression
WAV.wav500 MBUncompressed, highest quality
M4A.m4a100 MBApple format, good quality
OGG.ogg100 MBOpen source format
FLAC.flac500 MBLossless compression
WebM.webm100 MBWeb-native format

Audio Quality Recommendations

For best transcription results:

  • Sample Rate: 16kHz or higher
  • Bit Depth: 16-bit or higher
  • Channels: Mono or stereo (stereo may improve speaker diarization)
  • Bit Rate: 128kbps or higher for compressed formats

Higher quality audio generally produces better transcription accuracy. If possible, use uncompressed or lossless formats.

Uploading Files

Basic Upload

curl -X POST "https://api.identitycall.com/api/v1/public/recordings" \ -H "Authorization: Bearer $IDENTITYCALL_API_KEY" \ -F "file=@recording.mp3" \ -F "language=en"

Upload with Progress Tracking

For large files, track upload progress:

import requests from requests_toolbelt import MultipartEncoderMonitor def upload_with_progress(file_path, api_key): def callback(monitor): progress = monitor.bytes_read / monitor.len * 100 print(f"\rUploading: {progress:.1f}%", end="") with open(file_path, "rb") as f: encoder = MultipartEncoder(fields={ "file": ("recording.mp3", f, "audio/mpeg"), "language": "en" }) monitor = MultipartEncoderMonitor(encoder, callback) response = requests.post( "https://api.identitycall.com/api/v1/public/recordings", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": monitor.content_type }, data=monitor ) print("\nUpload complete!") return response.json()

Handling Large Files

For files approaching the size limit:

  1. Compress if possible: Convert WAV to FLAC for lossless compression
  2. Split long recordings: Break into smaller segments if over the limit
  3. Use streaming upload: Prevent memory issues with large files

Files exceeding the size limit will be rejected with a 422 error.

Error Handling

Common upload errors and solutions:

ErrorCauseSolution
”file is required”No file in requestEnsure file is included in multipart form
”Invalid file type”Unsupported formatConvert to a supported format
”File too large”Exceeds size limitCompress or split the file
”Upload timeout”Slow connectionRetry with smaller file or better connection

Next Steps