audio.speech.create Typescript types are incorrect when `stream: true`
Looking at the type here, when passing stream true to the options the response type is still Response
https://github.com/openai/openai-node/blob/a1a125349ba9c9c2bb602c8c8f368e086c41ac1e/src/resources/audio/speech.ts#L11
Comparing this to the chat completions with the stream: true option:
https://github.com/openai/openai-node/blob/a1a125349ba9c9c2bb602c8c8f368e086c41ac1e/src/resources/chat/completions/completions.ts#L35-L38
The stream param in the chat completions API is referring to enabling SSE streaming. As far as I am aware the speech API does not support SSE, so the stream request option won't do anything.
Why are you trying to enable streaming? The Response we return shouldn't have been eagerly read fwiw.
The Response we return shouldn't have been eagerly read fwiw.
Could you expand on this a bit more? I'm not sure I fully understand it.
Regarding the speech streaming, I am attempting to use the chunk transfer encoding response to stream the audio to a browser client - https://platform.openai.com/docs/guides/text-to-speech#streaming-realtime-audio