Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download features.py from treble-technologies/ffasr: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/treble-technologies/ffasr/resolve/main/features.py
- Command line
-
hf download hf://spaces/treble-technologies/ffasr/features.py
-
curl -L -o features.py https://huggingface.co/spaces/treble-technologies/ffasr/resolve/main/features.py
1.1 kB
| """Switches for leaderboard tracks that are not released yet. | |
| Speaker diarization and full-duplex voice agents are built but switched off by default. With a | |
| switch off, its leaderboard track, Analysis view, Listen clips, Methodology section and Submit | |
| option are not built at all, and the server refuses submissions for it. Set the variable to | |
| ``1`` on a Space (for example the test Space) to preview a track: | |
| FFASR_ENABLE_DIARIZATION speaker diarization track and diarization submissions | |
| FFASR_ENABLE_DUPLEX full-duplex voice agent track (read-only) | |
| """ | |
| from __future__ import annotations | |
| import os | |
| _TRUTHY = ("1", "true", "yes", "on") | |
| def _on(name: str) -> bool: | |
| return os.environ.get(name, "").strip().lower() in _TRUTHY | |
| def diarization_enabled() -> bool: | |
| return _on("FFASR_ENABLE_DIARIZATION") | |
| def duplex_enabled() -> bool: | |
| return _on("FFASR_ENABLE_DUPLEX") | |
| def enabled_tracks() -> list[str]: | |
| """Leaderboard tracks to show, ASR first.""" | |
| return ["asr"] + (["diarization"] if diarization_enabled() else []) + (["duplex"] if duplex_enabled() else []) | |