v2.5.0 (#495)
Co-authored-by: Quentin Torroba <quentin.torroba@mistral.ai> Co-authored-by: Clement Sirieix <clem.sirieix@gmail.com> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai> Co-authored-by: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-authored-by: Michel Thomazo <michel.thomazo@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
9421fbc08e
commit
5103019b01
104 changed files with 7277 additions and 691 deletions
22
tests/stubs/fake_transcribe_client.py
Normal file
22
tests/stubs/fake_transcribe_client.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncIterator
|
||||
from typing import Any
|
||||
|
||||
from vibe.core.transcribe.transcribe_client_port import TranscribeEvent
|
||||
|
||||
|
||||
class FakeTranscribeClient:
|
||||
def __init__(
|
||||
self, *_args: Any, events: list[TranscribeEvent] | None = None, **_kwargs: Any
|
||||
) -> None:
|
||||
self._events: list[TranscribeEvent] = events or []
|
||||
|
||||
def set_events(self, events: list[TranscribeEvent]) -> None:
|
||||
self._events = events
|
||||
|
||||
async def transcribe(
|
||||
self, audio_stream: AsyncIterator[bytes]
|
||||
) -> AsyncIterator[TranscribeEvent]:
|
||||
for event in self._events:
|
||||
yield event
|
||||
Loading…
Add table
Add a link
Reference in a new issue