Skip to content

Commit

Permalink
return error status
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan Shaw committed Feb 28, 2025
1 parent 5f74ddf commit f135e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/api/speech_features.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class Phi4AudioEmbed {

// Currently we only support 8k and 16k Hz sampling rate.
if (sr_val != 8000 && sr_val != 16000){
ORTX_CXX_API_THROW("ort-extensions internal error: currently only 8k and 16k Hz sampling rate is supported. Please resample your audio file to either 8k or 16k.", ORT_RUNTIME_EXCEPTION);
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_);
Expand Down

0 comments on commit f135e21

Please sign in to comment.