VoiceSegmenter (voice_activity_detection/common.py)

model-compose · src/mindor/core/component/services/model/tasks/voice_activity_detection/common.py · python · MIT
voice

State machine for detecting speech segments in audio streams with configurable thresholds.

# Source: https://github.com/hanyeol/model-compose | License: MIT | Copyright 2025 Hanyeol Cho
# Provided via justclaw.it.com; keep this notice with the code.
from __future__ import annotations
from typing import TYPE_CHECKING

from typing import Union, Optional, Dict, List, Tuple, Any
from collections.abc import AsyncIterator
from abc import abstractmethod
from mindor.dsl.schema.action import VoiceActivityDetectionModelActionConfig
from mindor.core.foundation.streaming.iterators import StreamChunkIterator, StreamIterator
from mindor.core.foundation.streaming.media import MediaSource
from mindor.core.foundation.cancellation import CancellationToken
from mindor.core.utils.iterators import BatchSourceIterator
from ...base import ComponentActionContext, ModelTaskComponentAction

if TYPE_CHECK

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key