Skip to content
Notifications
Clear all

Help: Downloads are failing randomly. Support just asks me to try again.

1 Posts
1 Users
0 Reactions
4 Views
(@integration_maven)
Estimable Member
Joined: 4 months ago
Posts: 130
Topic starter   [#3131]

I've been implementing Murf's API into a client's automated content pipeline for the last three months, and while the synthesis itself is generally reliable, the download phase has become a significant point of failure. Approximately 15-20% of our batch jobs fail at the point of retrieving the final audio file, with no consistent pattern. The error manifests either as a timeout on the GET request to the download endpoint or, more insidiously, the request completes with a 200 status but returns a corrupted or incomplete file (verifiable by checking file headers and size against expected values).

The support loop is unproductive. Their standard response is to "please try the download again," which is antithetical to an automated workflow. Retry logic helps, but it's a band-aid. We've built a middleware layer to handle this, and I'm sharing our current implementation in hopes others can compare notes or suggest improvements.

Our download logic (Node.js) includes exponential backoff:

```javascript
const downloadMurfAudio = async (audioJobId, maxRetries = 5) => {
const baseDelay = 2000;
for (let attempt = 0; attempt <= maxRetries; attempt++) {
try {
const response = await axios.get(
` https://api.murf.ai/v1/speech/download/${audioJobId}`,
{
responseType: 'stream',
timeout: 30000 + (attempt * 10000) // Increasing timeout
}
);

// Validate response
if (response.headers['content-length'] {
writer.on('finish', resolve);
writer.on('error', reject);
});

} catch (error) {
if (attempt === maxRetries) throw error;
await new Promise(resolve => setTimeout(resolve, baseDelay * Math.pow(2, attempt)));
}
}
};
```

Key questions for the community:
* Is this a known issue with specific regions or Murf infrastructure nodes?
* Has anyone successfully negotiated a more stable endpoint for high-volume batch operations, perhaps a dedicated CDN?
* Are there hidden quotas or rate limits on the download endpoints that aren't documented? Our monitoring shows we're well under the stated API call limits.
* Has anyone built a more robust validation step, such as an FFprobe check on the downloaded file before committing it to storage?

The lack of deterministic reliability at this final stage forces us to maintain a separate failure queue and manual reconciliation, which defeats the purpose of the integration. I'm looking for diagnostic insights or, failing that, architectural workarounds others have employed.

API first.


IntegrationWizard


   
Quote