[播放平滑修复]:完成可打断播报平滑播放,包含单输出流分块播放和TTS采样率保真
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable, Sequence
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Protocol
|
||||
|
||||
from .models import (
|
||||
@@ -28,6 +28,15 @@ class AudioTransport(Protocol):
|
||||
def play_pcm(self, segment: AudioSegment, interrupt: bool = False) -> PlaybackResult:
|
||||
...
|
||||
|
||||
def play_pcm_chunks(
|
||||
self,
|
||||
segment: AudioSegment,
|
||||
*,
|
||||
chunk_ms: int,
|
||||
after_chunk: Callable[[AudioSegment, int], bool] | None = None,
|
||||
) -> PlaybackResult:
|
||||
...
|
||||
|
||||
def flush_input(self) -> int:
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user