79308709

Date: 2024-12-26 05:17:30
Score: 3
Natty:
Report link

I guess the code above one is backend and lower one is front-end. Are you able to get the response in the streaming from the openai? Bcz in python function call look like this:

    def aduioTextStream(text):
        with client.audio.speech.with_streaming_response.create(
            model="tts-1", voice="alloy", input=text, response_format="pcm"
        ) as response:
            for chunk in response.iter_bytes(chunk_size=1024):
                yield chunk

And yes I am facing the same issue in front-end side. the chunks are streaming to front-end but when make it audible and decoding it the content-type show the "octet-stream". I am backend dev. and i don't have enough knowledge in the front-end. Let me know it you know the answer how i can handle it.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I am facing the same issue
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Pankaj Jarial