Download audio/engine.py from TTS-ORG/translation-audio: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/TTS-ORG/translation-audio/resolve/main/audio/engine.py
- Command line
-
hf download hf://TTS-ORG/translation-audio/audio/engine.py
-
curl -L -o engine.py https://huggingface.co/TTS-ORG/translation-audio/resolve/main/audio/engine.py
513 Bytes
| from __future__ import annotations | |
| from collections.abc import Iterator | |
| from typing import Any, Protocol | |
| from shared.contracts import Transcript | |
| class AsrEngine(Protocol): | |
| backend: str | |
| model_name: str | |
| device: str | |
| compute_type: str | |
| replicas: int | |
| batch_size: int | |
| def transcribe(self, wav_path, language: str | None = None) -> Transcript: ... | |
| def transcribe_events( | |
| self, wav_path, language: str | None = None | |
| ) -> Iterator[dict[str, Any]]: ... | |