* feat: add real-time audio transcription and SRT generation nodes * feat: add RETURN_NAMES to AudioTranscriptionNode class * feat: implement RETURN_NAMES as a class method in AudioTranscriptionNode * refactor: add real-time audio transcription node and SRT generation capabilities * refactor: clean up imports and update class attributes in transcription nodes * refactor: streamline audio transcription logic and improve buffer handling * refactor: reorganize imports and streamline node registration in audio transcription * refactor: improve code readability and structure in audio transcription node * refactor: update SRT generation to return subtitles in JSON format * fix warmup sentienl in transcription node * adjust buffer logic for comfystream load_audio_tensor_stream node * fix return_name in srt_generator node (was breaking lightgraph) --------- Co-authored-by: John | Elite Encoder <john@eliteencoder.net>
24 lines
724 B
Python
24 lines
724 B
Python
"""
|
|
Real-time Audio Transcription Node for ComfyUI.
|
|
|
|
This node buffers audio segments and performs transcription using faster-whisper,
|
|
with controlled output timing to prevent message flooding.
|
|
"""
|
|
|
|
# Import node classes
|
|
from ..src.audio_transcription.transcription_nodes import AudioTranscriptionNode
|
|
from ..src.audio_transcription.srt_generator_node import SRTGeneratorNode
|
|
|
|
# Register the node
|
|
NODE_CLASS_MAPPINGS = {
|
|
"AudioTranscriptionNode": AudioTranscriptionNode,
|
|
"SRTGeneratorNode": SRTGeneratorNode
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"AudioTranscriptionNode": "Audio Transcription (Real-time)",
|
|
"SRTGeneratorNode": "SRT Generator"
|
|
}
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|