Silence Removal
Automatically detect and remove overly long silence segments from audio while preserving the desired amount of silence between spoken sections.
Prefer not to code? Upload files and process them in Gitruck Toolbox. Just sign in; results match this API.Open Silence Remover →
Create Task
| Item | Value |
|---|
| Request Method | POST |
| Request Path | /task/audio_silence_remove |
| Content-Type | application/json |
| Authentication | Raw API key in the Authorization header |
Request Body
| Parameter | Type | Required | Default | Description |
|---|
file_id | string | Yes | - | Uploaded audio file ID |
min_silence_len | integer | No | 1500 | How long a silence must last (ms) to count as a pause, 100–60000; only silences at least this long are processed |
desired_silence_len | integer | No | 1500 | Silence inserted between non-silent segments (ms), 0–60000; 0 inserts no silence |
Each non-silent segment also keeps about 0.1 s of its original silence at both ends so the sound is not cut off abruptly. The resulting pauses are therefore about 0.2 s longer than desired_silence_len; with 0, about 0.2 s remains between segments.
Request Example
curl -X POST https://api.ai-mcn.tv:10000/task/audio_silence_remove \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_id": "537489015178246",
"min_silence_len": 1500,
"desired_silence_len": 500
}'
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"task_type": "audio_silence_remove",
"status": "queued"
}
}
Query Task Result
| Item | Value |
|---|
| Request Method | GET |
| Request Path | /task/audio_silence_remove/{task_id} |
| Authentication | Raw API key in the Authorization header |
Output Result (output_result)
| Parameter | Type | Description |
|---|
file_id | string | Processed audio file ID |
download_url | string | Download path for the processed audio |
original_duration | number | Original duration in seconds |
processed_duration | number | Processed duration in seconds |
removed_silence_count | number | Number of pauses removed or shortened, including leading and trailing silence |
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"file_id": "537489015178248",
"download_url": "/download/a1/output_trimmed.mp3",
"original_duration": 180.5,
"processed_duration": 120.3,
"removed_silence_count": 15
},
"create_time": "2026-04-05T08:00:00Z",
"update_time": "2026-04-05T08:00:08Z"
}
}
Error Codes
| Error Code | HTTP Status | Description | Resolution |
|---|
6013 | 400 | Missing file_id | Pass the file_id field |
6016 | 400 | min_silence_len or desired_silence_len is out of range or not an integer | Pass an integer within the ranges in the request body table |
6004 | 404 | File not found | Verify the file_id |
6502 | 401 | Authentication failed | Check the Authorization header |
6202 | 402 | Insufficient balance | Recharge in the Dashboard |
Task Failure
When a task fails, status is failed, output_result.error explains why, and the deducted credits are refunded automatically.
| Case | output_result.error | Resolution |
|---|
| The whole audio is below the silence threshold, so no non-silent segment can be kept | 整段音频都是静音,没有可保留的声音,请更换音频后重试 (currently returned in Chinese: "The whole audio is silent; there is no sound to keep. Please use different audio and try again.") | Use audio that contains sound |