Format Conversion
AudioSpliter can convert your audio to a different format during the split. Set the outputFormat field to your desired format.
Supported Formats
| Format | Extension | Notes |
|---|---|---|
mp3 | .mp3 | Lossy, most compatible |
wav | .wav | Lossless, large files |
flac | .flac | Lossless compression |
ogg | .ogg | Open-source lossy format |
aac | .aac | Modern lossy format |
Example: Convert WAV to MP3 During Split
curl -X POST https://api.audiospliter.com/api/v1/splits \
-H "X-API-Key: as_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"sourceUrl": "https://example.com/recording.wav",
"splitMode": "duration",
"segmentDuration": 600,
"outputFormat": "mp3"
}'
This takes a WAV recording, splits it into 10-minute segments, and outputs each segment as MP3.
Node.js Example
const response = await fetch('https://api.audiospliter.com/api/v1/splits', {
method: 'POST',
headers: {
'X-API-Key': process.env.AUDIOSPLITER_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
sourceUrl: 'https://example.com/recording.wav',
splitMode: 'duration',
segmentDuration: 300,
outputFormat: 'flac', // Convert to FLAC
}),
});
const job = await response.json();
Python Example
import requests, os
response = requests.post(
'https://api.audiospliter.com/api/v1/splits',
headers={'X-API-Key': os.environ['AUDIOSPLITER_API_KEY']},
json={
'sourceUrl': 'https://example.com/recording.wav',
'splitMode': 'duration',
'segmentDuration': 300,
'outputFormat': 'flac',
},
)
Format Selection Guide
| Need | Recommended Format |
|---|---|
| Smallest file size | mp3 or aac |
| Lossless quality | flac |
| Maximum compatibility | mp3 |
| Web audio playback | ogg or aac |
| Professional editing | wav |
Tips
- Omit
outputFormatto keep the same format as the source file. - Converting lossy to lossless (e.g., MP3 to WAV) does not improve quality -- it only increases file size.
- Format conversion adds minimal processing time. The dominant factor is file size and segment count.