Skip to content

Commit 66554a5

Browse files
fix(stt): limit Soniqo model options
Only advertise Soniqo Parakeet Streaming and Parakeet Batch while keeping legacy Soniqo model IDs parseable.
1 parent b2ea1c7 commit 66554a5

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

crates/local-stt-core/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ pub use hypr_local_model::{AmModel, CactusSttModel, LocalModel, SoniqoModel, Whi
33
pub static SUPPORTED_MODELS: &[LocalModel] = &[
44
LocalModel::Soniqo(SoniqoModel::ParakeetStreaming),
55
LocalModel::Soniqo(SoniqoModel::ParakeetBatch),
6-
LocalModel::Soniqo(SoniqoModel::Omnilingual),
7-
LocalModel::Soniqo(SoniqoModel::Qwen3Small),
8-
LocalModel::Soniqo(SoniqoModel::Qwen3Large),
96
LocalModel::Am(AmModel::ParakeetV2),
107
LocalModel::Am(AmModel::ParakeetV3),
118
LocalModel::Am(AmModel::WhisperLargeV3),

crates/transcribe-soniqo/src/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,16 @@ pub enum SoniqoModel {
6464
}
6565

6666
impl SoniqoModel {
67+
const KNOWN: &'static [Self] = &[
68+
Self::ParakeetStreaming,
69+
Self::ParakeetBatch,
70+
Self::Omnilingual,
71+
Self::Qwen3Small,
72+
Self::Qwen3Large,
73+
];
74+
6775
pub const fn all() -> &'static [Self] {
68-
&[
69-
Self::ParakeetStreaming,
70-
Self::ParakeetBatch,
71-
Self::Omnilingual,
72-
Self::Qwen3Small,
73-
Self::Qwen3Large,
74-
]
76+
&[Self::ParakeetStreaming, Self::ParakeetBatch]
7577
}
7678

7779
pub const fn as_str(self) -> &'static str {
@@ -162,7 +164,7 @@ impl FromStr for SoniqoModel {
162164
type Err = Error;
163165

164166
fn from_str(value: &str) -> Result<Self> {
165-
Self::all()
167+
Self::KNOWN
166168
.iter()
167169
.copied()
168170
.find(|model| value == model.as_str() || value == model.repo())

0 commit comments

Comments
 (0)