https://retellai.com/?utm_source=discord&utm_medium=seo logo
Voice.clone responding with Internal Server Error ...
# ❓・bug-report
d
Hi Team, I’m encountering an issue with the voice.clone method in the SDK where the files field does not appear to be handled correctly. When sending a valid .mp3 file (via fs.createReadStream / multipart form-data), the request results in a 500 Internal Server Error from the Retell API. The same file is correctly received on my backend, and the file path/stream is valid. It seems the SDK may not be properly serializing or forwarding the files field in the request. Could you please confirm: 1. The expected format for the files field in voice.clone 2. Whether the current published SDK version fully supports file uploads for this endpoint 3. If there are known issues with multipart handling in this method Happy to provide logs or a minimal reproduction script if needed.
s
Hi @DeadNecromancer
@DeadNecromancer could you provide a reproduction script?
d
> async function cloningvoice() { > try { > const filePath = > 'tmp/Vital_Ext_113.mp3'; > const voice_provider = 'platform'; > const voiceResponse = await retellClient.voice.clone({ > voice_name: 'new_voice', > voice_provider: voice_provider, > files: [fs.createReadStream(filePath)], > }); > console.log(voiceResponse); > return voiceResponse; > } catch (error) { > console.error('Error cloning voice:', error); > } > } This is my current actual code that I am using. The file is .mp3 and is actually present in the project directory according to the path mentioned.
Receiving the response of this format: > > > > > Error > > > Internal Server Error > >
s
Ok @DeadNecromancer I send this to team to look
d
Thanks a lot.
@Shehroze -Support @Retell any update?
s
Hi @DeadNecromancer Can you send me the mp3 file as well?
@Shehroze -Support @Retell Sure, this is the file that I am using.
@Shehroze -Support @Retell any update?
@Shehroze -Support @Retell ??
s
Hi @DeadNecromancer Team have a fix for this, should be out tomorrow
d
Thanks a lot
@Shehroze -Support @Retell The fix is still not out, when can I expect it to be released?
s
Hello @DeadNecromancer fix is in review
Hi @DeadNecromancer This fix is done, should be fixed with the next sdk release. Thank You
d
@Shehroze -Support @Retell Thanks for all the help. Much appreciated