The specs say that the return value is “The audio file content.” and examples show “mp3.arrayBuffer()” and “mp3.stream_to_file()”.
Can the documentation be updated to explain exactly what is returned from the speech.create() mthod?
wclayf
2
Isn’t the docs just implying it returns the raw bytes the content of an audio file?
Looks like this one worked.
const mp3 = Buffer.from(await response.arrayBuffer());
So the client.audio.speech.create method seems to return a Node “response” object, and we get the raw bytes using the .arrayBuffer() method.