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

added : task, word_timestamps, without_timestamps , and for realtime change try from outside to inside loop #168

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update audio_recorder.py
TommasoRella-github authored Dec 15, 2024
commit fcd4e1eed7d9acc4bc9d033c8a437fe3091d75ae
8 changes: 4 additions & 4 deletions RealtimeSTT/audio_recorder.py
Original file line number Diff line number Diff line change
@@ -295,8 +295,8 @@ def __init__(self,
on_recorded_chunk=None,
debug_mode=False,
handle_buffer_overflow: bool = INIT_HANDLE_BUFFER_OVERFLOW,
beam_size: int = 5, #<---indicaquanti rami di ricerca deve mantenere aperti ad gni step(https://en.wikipedia.org/wiki/Beam_search) (1=+veloce-precisaNelContesto ...5=-veloce+precisaNelContesto ) (1-esegue ricerca in profondita un ramo, 5 -esegue ricerca in profondita 5rami contemp.)
beam_size_realtime: int = 3, #<---indicaquanti rami di ricerca deve mantenere aperti ad gni step(https://en.wikipedia.org/wiki/Beam_search) (1=+veloce-precisaNelContesto ...5=-veloce+precisaNelContesto ) (1-esegue ricerca in profondita un ramo, 5 -esegue ricerca in profondita 5rami contemp.)
beam_size: int = 5, #<---how many searching path to use.(https://en.wikipedia.org/wiki/Beam_search) (1=faster,lessContextPrecision ...5=lower,more context precision) (1-deep search in 1 branch, 5 -deep search in 5 branchs simultan.)
beam_size_realtime: int = 3, #<---how many searching path to use.(https://en.wikipedia.org/wiki/Beam_search) (1=faster,lessContextPrecision ...5=lower,more context precision) (1-deep search in 1 branch, 5 -deep search in 5 branchs simultan.)
buffer_size: int = BUFFER_SIZE,
sample_rate: int = SAMPLE_RATE,
initial_prompt: Optional[Union[str, Iterable[int]]] = None,
@@ -697,7 +697,7 @@ def __init__(self,
self.initial_prompt,
self.suppress_tokens,
self.batch_size,
self.task,
self.task,
self.without_timestamps,
self.word_timestamps ,
)
@@ -2074,7 +2074,7 @@ def _realtime_worker(self):
and a callback
function is invoked with this text if specified.
"""
###TR## better inside circle
### better inside the loop
# try:

logging.debug('Starting realtime worker')