(text: str, audio_duration: float)
| 96 | stream.end_input() |
| 97 | |
| 98 | async def _stream_task(text: str, audio_duration: float) -> None: |
| 99 | fake1.update_options(fake_timeout=0.5, fake_audio_duration=audio_duration) |
| 100 | |
| 101 | async with fallback_adapter.stream() as stream: |
| 102 | input_task = asyncio.create_task(_input_task(stream, text)) |
| 103 | |
| 104 | segments = set() |
| 105 | try: |
| 106 | async for ev in stream: |
| 107 | segments.add(ev.segment_id) |
| 108 | finally: |
| 109 | await input_task |
| 110 | |
| 111 | if audio_duration > 0.0: |
| 112 | assert len(segments) == 1 |
| 113 | else: |
| 114 | assert len(segments) == 0 |
| 115 | |
| 116 | await _stream_task("hello test normal", 1.0) |
| 117 |
no test coverage detected