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

alias timestamp_granularities[] does not actually work #80

Closed
wants to merge 1 commit into from

Conversation

sreeprasannar
Copy link

This ends up breaking the non-aliased version as well - this means regardless of what you set in timestamp_granularities you'll always have the default value of [segment]

This leads to the issues we see in #29, #58

The core issue could be the special characters in Form(alias=) - but I can find several sources that claim that this should work - fastapi/fastapi#5765

This warrants more exploration so I added two tests. To demonstrate the problem with the alias, I removed it in this PR and one of the tests pass.

This ends up breaking the non-aliased version as well - this means regardless of what you set in `timestamp_granularities` you'll always have the default value of `[segment]`

This leads to the issues we see in speaches-ai#29, speaches-ai#58
@sreeprasannar
Copy link
Author

sreeprasannar commented Sep 12, 2024

More surprising is that the OpenAI api requires this to work:

 transcript = client.audio.transcriptions.create(
                model="Systran/faster-distil-whisper-large-v3",
                file=audio_bytes,
                timeout=max_request_timeout,
                response_format="verbose_json",
                timestamp_granularities="word"
            )

Note the timestamp_granularities="word" and not an array.

@fedirz
Copy link
Collaborator

fedirz commented Oct 1, 2024

This has been addressed in #89. Thanks for creating a pr!

@fedirz fedirz closed this Oct 1, 2024
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

Successfully merging this pull request may close these issues.

2 participants