NvidiaTTSService: return AsyncIterator instead of AsyncIterable

This commit is contained in:
Aleix Conchillo Flaqué
2026-01-28 22:34:26 -08:00
parent 183c0aa4ef
commit 27dbfa1eda

View File

@@ -12,7 +12,7 @@ gRPC API for high-quality speech synthesis.
import asyncio
import os
from typing import AsyncGenerator, AsyncIterable, Generator, Mapping, Optional
from typing import AsyncGenerator, AsyncIterator, Generator, Mapping, Optional
from pipecat.utils.tracing.service_decorators import traced_tts
@@ -181,7 +181,7 @@ class NvidiaTTSService(TTSService):
except StopIteration:
return None
async def async_iterator(iterator) -> AsyncIterable[rtts.SynthesizeSpeechResponse]:
async def async_iterator(iterator) -> AsyncIterator[rtts.SynthesizeSpeechResponse]:
while True:
item = await asyncio.to_thread(async_next, iterator)
if item is None: