google / lyra

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

Realtime Encoding and Decoding on Linux Qstn! #86

Closed thesunRider closed 2 years ago

thesunRider commented 2 years ago

Kudos, Great Work!

I wish to capture the microphone stream and feed it to Lyra instead of supplying a wav file,The objective is to create Underwater Communication Equipment. So how should I go on about feeding the binary stream to Lyra for encoding it realtime, The API's mentioned in the docs seem to all accept filename as input.The target is LINUX.

Regards.

aluebs commented 2 years ago

Thank you for the question. That is a great application for Lyra. If you are writing a C++ Linux application, you can use the LyraEncoder and LyraDecoder APIs described in the API section of the README, which run in real-time and encode and decode packets of 40ms. For an example on how to do that, you can refer to the android_example, encoder_main and decoder_main, or the lyra_integration_test.