support distil-large-v3 (#1898)

This commit is contained in:
Sanchit Gandhi
2024-03-21 16:16:49 +05:30
committed by GitHub
parent 18036c6ccb
commit 0c11e055be

View File

@ -374,6 +374,8 @@ enum WhichModel {
DistilMediumEn, DistilMediumEn,
#[value(name = "distil-large-v2")] #[value(name = "distil-large-v2")]
DistilLargeV2, DistilLargeV2,
#[value(name = "distil-large-v3")]
DistilLargeV3,
} }
impl WhichModel { impl WhichModel {
@ -386,7 +388,8 @@ impl WhichModel {
| Self::Large | Self::Large
| Self::LargeV2 | Self::LargeV2
| Self::LargeV3 | Self::LargeV3
| Self::DistilLargeV2 => true, | Self::DistilLargeV2
| Self::DistilLargeV3 => true,
Self::TinyEn | Self::BaseEn | Self::SmallEn | Self::MediumEn | Self::DistilMediumEn => { Self::TinyEn | Self::BaseEn | Self::SmallEn | Self::MediumEn | Self::DistilMediumEn => {
false false
} }
@ -408,6 +411,7 @@ impl WhichModel {
Self::LargeV3 => ("openai/whisper-large-v3", "main"), Self::LargeV3 => ("openai/whisper-large-v3", "main"),
Self::DistilMediumEn => ("distil-whisper/distil-medium.en", "main"), Self::DistilMediumEn => ("distil-whisper/distil-medium.en", "main"),
Self::DistilLargeV2 => ("distil-whisper/distil-large-v2", "main"), Self::DistilLargeV2 => ("distil-whisper/distil-large-v2", "main"),
Self::DistilLargeV3 => ("distil-whisper/distil-large-v3", "main"),
} }
} }
} }