Requirements for a downloable audio file on an endpoint

Original Discord Post by streamcrashmaker | 2024-11-06 17:45:16

Hello guys, hope you are well.
Convai endpoint docs: Interaction API | Documentation

We are wondering what are the requirements for a downloable audio file on an endpoint (POST character/getResponse)

I have found that the API works successfully with extname .wav files, but not all of them. For some files I get an error: “Audio file configuration error : Expecting number of channels to be 1.”

—> is somebody can help ?

Embedded Content:
Interaction API | Documentation
This page details on how you can interact with Character.
Link: Interaction API | Documentation

Reply by streamcrashmaker | 2024-11-09 13:17:25

up

Reply by d_acharyya | 2024-11-11 11:01:31

Hi <@1165995909092495431> can you pls tell me what you are trying to do ?

Reply by streamcrashmaker | 2024-11-11 11:43:29

hey <@547328106927620106>

Based on official documentation:

We are going to send an audio file to ConvaiAPI to interact with a character and get a response from the API. We are using a client-side generated voice recording and passing this file to Convai. We have defined that the file must have a .wav extname and mimeType ‘audio/wav’, but this is not the entire list of file requirements for validation, and in most cases we get Error: Bad Request with different descriptions

Reply by streamcrashmaker | 2024-11-11 11:46:47

Could we get the whole list of requirements to get a successful response from Convai API for downloadable files? This field:

Images:
image.png

Reply by d_acharyya | 2024-11-11 12:54:50

Oh I see, so the input audio file should be mono (# of channels = 1), wav format (pcm) , bit depth should be 16. Also send the sampleRateHz as part of the request, with the sample rate of the audio file as the value.