MCPcopy Create free account

hub / github.com/KoljaB/RealtimeVoiceChat / functions

Functions152 in github.com/KoljaB/RealtimeVoiceChat

Method__init__
Initializes a PipelineRequest instance. Args: action: The type of action requested (e.g., "prepare", "abort").
code/speech_pipeline_manager.py:54
Method__init__
Initializes a RunningGeneration state object. Args: id: A unique identifier for this generation attempt.
code/speech_pipeline_manager.py:74
Method__init__
Initializes the SpeechPipelineManager. Sets up configuration, instantiates dependencies (AudioProcessor, LLM, etc.), loads s
code/speech_pipeline_manager.py:122
Method__str__
(self)
code/colors.py:74
Method_abort_worker
Background thread worker to check for abort conditions based on partial text.
code/server.py:594
Method_llm_inference_worker
Worker thread target that handles LLM inference for a generation. Waits for `generator_ready_event`. Once signaled, it iterates thro
code/speech_pipeline_manager.py:330
Method_on_recording_start
Internal callback relay triggered when the transcriber starts recording.
code/audio_in.py:66
Method_pretty
(v, max_len=60)
code/transcribe.py:743
Method_request_processing_worker
Worker thread target that processes requests from the `requests_queue`. Continuously monitors the queue. When a request arrives, it
code/speech_pipeline_manager.py:229
Method_silence_active_callback
Internal callback relay for silence detection status.
code/audio_in.py:61
Method_text_worker
Background worker thread that processes text from the queue for turn detection. Continuously retrieves text items from `self.text_qu
code/turndetect.py:403
Method_tts_final_inference_worker
Worker thread target that handles TTS synthesis for the 'final' part of the answer. Continuously checks the `running_generation`. It
code/speech_pipeline_manager.py:643
Method_tts_quick_inference_worker
Worker thread target that handles TTS synthesis for the 'quick answer'. Waits for `llm_answer_ready_event`. Once signaled, it checks
code/speech_pipeline_manager.py:534
Methodabort_generation
Clears the cache of potentially yielded sentences. This effectively stops any further actions that might be triggered based
code/transcribe.py:383
Methodcleanup_stale_requests
Finds and attempts to cancel requests older than the specified timeout. Iterates through active requests and calls `cancel_generatio
code/llm_module.py:452
Methodconstructor
()
code/static/ttsPlaybackProcessor.js:2
Functionfavicon
Serves the favicon.ico file. Returns: A FileResponse containing the favicon.
code/server.py:158
Methodfinish_generation
Public method to signal the end of user input or interaction. Queues a 'finish' action onto the `requests_queue`. Note: Curr
code/speech_pipeline_manager.py:999
Methodflush_base64_chunk
Returns the final remaining segment of upsampled audio after all chunks are processed. After the last call to `get_base64_chunk`, th
code/upsample_overlap.py:87
MethodformatTime
Formats the log record's creation time into MM:SS.cs format. Uses `time.localtime` to convert the record's creation timestamp and
code/logsetup.py:16
Methodget_generator
Yields remaining text chunks for final TTS synthesis.
code/speech_pipeline_manager.py:687
Functionget_index
Serves the main index.html page. Reads the content of static/index.html and returns it as an HTML response. Returns: An HTMLRes
code/server.py:168
Methodget_response
Gets the response for a requested path, adding no-cache headers. Args: path: The path to the static file requested.
code/server.py:83
Functionlifespan
Manages the application's lifespan, initializing and shutting down resources. Initializes global components like SpeechPipelineManager, Upsa
code/server.py:107
Methodmonitor
()
code/transcribe.py:241
Methodon_audio_chunk
(chunk: bytes)
code/audio_module.py:273
Methodon_audio_chunk_ttfa
(chunk: bytes)
code/audio_module.py:181
Methodon_audio_stream_stop
Callback executed when the RealtimeTTS audio stream stops processing. Logs the event and sets the `finished_event` to signal complet
code/audio_module.py:220
Methodon_before_final
Callback invoked just before the final STT result for a user turn is confirmed. Sets flags indicating user finished, allows TTS if p
code/server.py:664
Methodon_final
(text: Optional[str])
code/transcribe.py:350
Methodon_final
Callback invoked when the final transcription result for a user turn is available. Logs the final transcription and stores it.
code/server.py:715
Methodon_partial
Callback triggered for real-time transcription updates.
code/transcribe.py:705
Methodon_partial
Callback invoked when a partial transcription result is available. Updates internal state, sends the partial result to the client,
code/server.py:606
Methodon_potential_abort
Callback invoked if the STT detects a potential need to abort based on user speech.
code/server.py:659
Methodon_potential_final
Callback invoked when a potential *final* transcription is detected (hot state). Logs the potential final transcription. Ar
code/server.py:648
Methodon_potential_sentence
Callback invoked when a potentially complete sentence is detected by the STT. Triggers the preparation of a speech generation based
code/server.py:635
Methodon_recording_start
Callback invoked when the audio input processor starts recording user speech. If client-side TTS is playing, it triggers an interrup
code/server.py:774
Methodon_silence_active
Callback invoked when the silence detection state changes. Updates the internal silence_active flag. Args: sile
code/server.py:741
Methodpartial_transcript_callback
Handles partial transcription results from the transcriber.
code/audio_in.py:78
Methodperform_final
Manually triggers the final transcription process using the last known real-time text. This bypasses the recorder's natural
code/transcribe.py:394
Methodprocess
(inputs)
code/static/pcmWorkletProcessor.js:3
Methodprocess
(inputs, outputs)
code/static/ttsPlaybackProcessor.js:28
Methodreset
Resets the pipeline state completely. Aborts any currently running generation (waiting for completion) and clears the conver
code/speech_pipeline_manager.py:1047
Methodsafe_abort_running_syntheses
Placeholder for safely aborting syntheses (currently does nothing).
code/server.py:623
Methodshutdown
Shuts down the recorder instance, cleans up resources, and prevents further processing. Sets the `shutdown_performed` flag.
code/transcribe.py:809
Methodshutdown
Initiates a graceful shutdown of the pipeline manager and worker threads. 1. Sets the `shutdown_event`. 2. Attempts a final
code/speech_pipeline_manager.py:1059
Methodstart_recording
Callback triggered when recorder starts a new recording segment.
code/transcribe.py:676
Methodstart_silence_detection
Callback triggered when recorder detects start of silence (end of speech).
code/transcribe.py:660
Methodstop_recording
Callback triggered when recorder stops a recording segment, just before final transcription might be generated.
code/transcribe.py:684
Methodstop_silence_detection
Callback triggered when recorder detects end of silence (start of speech).
code/transcribe.py:669
Methodtranscribe_loop
Sets up the final transcription callback mechanism with the recorder. This method defines the `on_final` callback that will be invok
code/transcribe.py:342
Functionwebsocket_endpoint
Handles the main WebSocket connection for real-time voice chat. Accepts a connection, sets up connection-specific state via `TranscriptionCa
code/server.py:874
← previous101–152 of 152, ranked by callers