google / lyra

A Very Low-Bitrate Codec for Speech Compression
Apache License 2.0
3.84k stars 355 forks source link

what bitrates are supported by Lyra v2 ? #95

Closed zxinhui-fb closed 2 years ago

zxinhui-fb commented 2 years ago

I came across the issue with the bitrate setup. For example, 32 kbps is not supported.

time bazel-bin/encoder_main --input_path=testdata/sample1_16kHz.wav --output_dir=$HOME/temp --bitrate=32000 WARNING: Logging before InitGoogleLogging() is written to STDERR E20221002 18:39:01.979354 1877650 lyra_encoder.cc:54] Bitrate 32000 bps is not supported by codec.

mchinen commented 2 years ago

Thanks for your question. Indeed the API only allows some bitrates. We should document this better. The supported rates are 3200, 6000, and 9200 bps.

zxinhui-fb commented 2 years ago

Thanks, mchinen! I found the list here. https://github.com/google/lyra/blob/c2395ffa8d32e0a0447c4ba534292015b282850a/lyra_encoder.h#L52

mchinen commented 2 years ago

To follow-up, the latest version added documentation to the --bitrate flag.