Skip to content

Commit

Permalink
Merge branch 'main' into phi4s
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanshaw24 authored Feb 28, 2025
2 parents 1fc2ae8 + 5541566 commit 34d0037
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shared/api/speech_features.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,13 @@ class Phi4AudioEmbed {

SpeechLibLogMel logmel;
// already checked in Init
logmel.Init(sr_val == 8000? logmel_8k_attrs_: logmel_attrs_);

// Currently we only support 8k and 16k Hz sampling rate.
if (sr_val != 8000 && sr_val != 16000){
return OrtxStatus(kOrtxErrorNotImplemented, "Currently only 8k and 16k Hz sampling rate is supported. Please resample your audio file with unsupported audio sampling rate: " + sr_val);
}

logmel.Init(sr_val == 8000 ? logmel_8k_attrs_: logmel_attrs_);
status = logmel.Compute(stft_norm, ts_logmel);
if (!status.IsOk()) {
return status;
Expand Down

0 comments on commit 34d0037

Please sign in to comment.