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

Store lang_id in context #461

Merged
merged 1 commit into from
Feb 5, 2023
Merged

Conversation

kamranjon
Copy link
Contributor

This stores the language id in the context. This is useful if you are using the auto detect language feature, and want access to the language after the running whisper_full.

I am not very familiar with C++ so feel free to ignore this if it is not the correct approach. If you do know another way to access this value without having to rerun the language detection with whisper_lang_auto_detect, it would be great if you could share that information with me.

With this code you can do something like this:

whisper_lang_str(whisper_full_lang_id(ctx));

After running whisper_full - to get a string like en or cs

@ggerganov ggerganov merged commit a1c1583 into ggerganov:master Feb 5, 2023
rock3125 pushed a commit to rock3125/whisper.cpp that referenced this pull request Feb 21, 2023
anandijain pushed a commit to anandijain/whisper.cpp that referenced this pull request Apr 28, 2023
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this pull request Oct 24, 2023
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this pull request Oct 24, 2023
landtanin pushed a commit to landtanin/whisper.cpp that referenced this pull request Dec 16, 2023
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 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