Skip to content
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

Stream Transcribe doesn't allow TranscribeOptionalParams to be passed. #60

Open
RogerBarreto opened this issue Jan 17, 2025 · 2 comments

Comments

@RogerBarreto
Copy link

Suggest updating the

) => SubmitAsync(audioFileStream, new TranscriptOptionalParams(), options, cancellationToken);
, to allow the TranscribeOptionsParams to go downstream the streaming.

@Swimburger
Copy link
Contributor

Can you elaborate?

@RogerBarreto
Copy link
Author

There's no API for�client.Transcripts.TranscribeAsync(stream, optionalOptions, cancellationToken)

Attempting to add this IntegrationTests to TranscriptClientTests.cs will not compile.

    [Test]
    public async Task Should_Submit_Using_Stream_With_Options()
    {
        var client = Helpers.CreateClient();
        // Adjust the path to where your test file is located
        var testFilePath = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "nbc.mp3");
        using var stream = File.OpenRead(testFilePath);

        var transcript = await client.Transcripts.TranscribeAsync(stream, 
            new TranscriptOptionalParams
            {
                LanguageCode = TranscriptLanguageCode.Pt,
            }, 
            CancellationToken.None)
        .ConfigureAwait(false);

        Assert.That(transcript, Is.Not.Null);
        Assert.Multiple(() =>
        {
            Assert.That(transcript.Id, Is.Not.Null);
            Assert.That(transcript.Text, Is.Null);
            Assert.That(transcript.Status, Is.EqualTo(TranscriptStatus.Queued));
        });
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants