ffasr / features.py
whojavumusic's picture
FFASR leaderboard: redesigned board, Avg WER chart, base-model grouping
5f0f535
Raw History Blame Contribute Delete
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 [])