[opus] about speech/music detector in opus 1.3.1

jiajun xu xujiajun at yeecall.com
Wed Nov 13 02:15:31 UTC 2019


Hi,

I’m wondering how can I get the speech/music classification result when encoding the audio in opus 1.3.1?

I found in the file opus_encoder.c, there is a opus_encoder_ctl request as OPUS_GET_VOICE_RATIO_REQUEST, so I wrote in my program the below code:

#define OPUS_GET_VOICE_RATIO(x) 11019, __opus_check_int_ptr(x)

int32_t voiceRatio;
opus_encoder_ctl(encoder, OPUS_GET_VOICE_RATIO(&voiceRatio));
LOGI("voice ratio:%d", voiceRatio);

But it always return -1.

And then I found that in the opus_encoder.c, the classification can only enable when #ifndef DISABLE_FLOAT_API, but I’m not sure if & where we define the DISABLE_FLOAT_API? How can I build the lib without this macro?

I build the lib for IOS, using the script at https://github.com/chrisballinger/Opus-iOS <https://github.com/chrisballinger/Opus-iOS>

It takes me several days to test but no success, can you help me?

Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20191113/d97ec1a1/attachment.html>


More information about the opus mailing list