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

on_realtime_transcription_stabilized continuously repeating callbacks #159

Open
jacobtang opened this issue Dec 7, 2024 · 1 comment
Open

Comments

@jacobtang
Copy link

Hi,when I use realtime transcription call back for a period of time,text_detected will always return the same words,even though there is no real-time voice data input.
recorder_config = {
'spinner': False,
'use_microphone': False,
'model': 'distil-small.en',
'language': 'en',
#'debug_mode': True,
#'level': logging.INFO,
#'silero_sensitivity': 0.4,
#'webrtc_sensitivity': 0,
#'post_speech_silence_duration': 0.1,
#'min_length_of_recording': 1,
#'min_gap_between_recordings': 0.1,
'enable_realtime_transcription': True,
#'realtime_processing_pause': 0.5,
'realtime_model_type': 'distil-small.en',
'beam_size_realtime': 1,

    'on_realtime_transcription_stabilized': text_detected,
}
Repository owner deleted a comment Dec 7, 2024
@KoljaB
Copy link
Owner

KoljaB commented Dec 7, 2024

That’s the expected behavior. Since you're using use_microphone=False, it's likely that you're feeding audio chunks from an external source. The RealtimeSTT model processes full sentences, and it reports the full text of a sentence from the beginning when using the real-time model. This is necessary because speech to text models rely on context to accurately transcribe.

If no voice data is being inputted, RealtimeSTT doesn't process anything new and thus returns the same text as before. This is the intended behavior and works as expected. Do you think it should function differently and if so, how would you think it should work instead?

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