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

Disable Hallucination in Whisper C++ RKNN #284

Open
Erzen7 opened this issue Feb 25, 2025 · 0 comments
Open

Disable Hallucination in Whisper C++ RKNN #284

Erzen7 opened this issue Feb 25, 2025 · 0 comments

Comments

@Erzen7
Copy link

Erzen7 commented Feb 25, 2025

We are using the Whisper example from the RKNN Model Zoo ( https://github.com/airockchip/rknn_model_zoo/tree/main/examples/whisper/cpp) for RKNN inference on our device. However, we have observed that the model sometimes generates hallucinated text,meaning it produces words or phrases that were not present in the original audio input.

To improve transcription accuracy, we would like to disable or minimize hallucination. Could you provide guidance on how to adjust the model settings, decoding parameters, or RKNN configurations to achieve this? If modifications to the example code are required, please suggest the necessary changes.
I found some solution in openai guthub discussion: openai/whisper#679, but there are different from rknn configs
Also this: https://community.openai.com/t/how-to-avoid-hallucinations-in-whisper-transcriptions/125300/16.
Can you help us to do these changes in rknn cpp

Steps to Reproduce:
Run the Whisper C++ example on an RKNN-supported device.
Provide an input audio sample with silent or low-quality speech.
Observe that the model sometimes generates text that was not actually spoken.
Expected Behavior:
The model should generate transcriptions that closely match the input speech (in our case from mic) and avoid unnecessary hallucination.

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

1 participant