Skip to content

gpt-4o-transcribe create transcription stream bug #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
redpancho opened this issue Mar 23, 2025 · 1 comment
Open
1 task done

gpt-4o-transcribe create transcription stream bug #1415

redpancho opened this issue Mar 23, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@redpancho
Copy link

redpancho commented Mar 23, 2025

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

https://platform.openai.com/docs/api-reference/audio/createTranscription this page suggests that stream: true works for the 2 new models gpt-4o-mini-transcribe and gpt-4o-transcribe, however the behavior is not as expected on the page.

import fs from "fs";
import OpenAI from "openai";

const openai = new OpenAI();

const stream = await openai.audio.transcriptions.create({
  file: fs.createReadStream("audio.mp3"),
  model: "gpt-4o-mini-transcribe",
  stream: true,
});

for await (const event of stream) {
  console.log(event);
}

This is valid code. However, the "event" variable will output one letter at a time rather than what the API Reference suggests (a full JSON object)

Looking at the SDK the response does not look like it is being sent to ResponseStream correctly.

Thank you.

To Reproduce

    const stream = await openai.audio.transcriptions.create({
        file: fs.createReadStream("./audio.mp3"),
        model: "gpt-4o-transcribe",
        language: 'en',
        stream: true,
        response_format: 'json',
    });

    for await (const event of stream) {
            console.log(event);
    }

OS

Windows

Node version

20.12.0

Library version

v4.89.0

@redpancho redpancho added the bug Something isn't working label Mar 23, 2025
@Lucas-Levandoski
Copy link

Lucas-Levandoski commented Apr 15, 2025

Just gave it a shot and it is running just fine on version 4.92.1, even returning it as a json

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants