Skip to content

No README information on how to compile fargan_demo #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rafael2k opened this issue Mar 26, 2025 · 7 comments
Open

No README information on how to compile fargan_demo #395

rafael2k opened this issue Mar 26, 2025 · 7 comments

Comments

@rafael2k
Copy link

I'm trying to compile fargan_demo, but without success. Any instructions on how to build its code?

@rillian
Copy link
Contributor

rillian commented Mar 26, 2025

./configure --enable-deep-plc && make -j 8 should result in a ./fargan_demo.

If you need it for some other target, it links statically with the lpcnet and celt libraries.

@rafael2k
Copy link
Author

Thanks a lot @rillian !
Input is pcm uint16 16 kHz samples right?

@rafael2k
Copy link
Author

I managed to use, it works, I can encode and decode an audio, thanks! But the features file size is massive. Is FARGAN supposed to be a LPCNet substitute?

@rillian
Copy link
Contributor

rillian commented Mar 26, 2025

Yes, it's a more efficient (in time and quality) replacement. See https://arxiv.org/pdf/2405.21069

@rafael2k
Copy link
Author

rafael2k commented Mar 26, 2025

Thanks again @rillian. I took a look in the article, but I need more information about the actual encoding and decoding, and how to set the bitrate, if tunable. The is no MOS versus bitrate table / graph in the article. I'm a bit confused also as the file created by fargan_demo is much bigger than what it was supposed to be if the audio was compressed at around 1.something kbit/s.

LPCNet README suggests users are encouraged to switch to fargan, but there are no examples on how to achieve results analog to lpcnet_demo "-encode" and "-decode".

@rillian
Copy link
Contributor

rillian commented Mar 26, 2025

Sorry, I don't know much about it beyond what I've already said. Are you expecting fargan_demo to produce compressed audio? It looks to me like it just runs the feature extraction/sythesis component. The 'features' file is just just a f32 vector for each audio frame. You'd have to run the full opus encoder to produce compressed output at a target bitrate, or construct your own format if you want to code just the fargan output for efficient transmission.

@rafael2k
Copy link
Author

Indeed, it is just the feature vector, without the actual entropy coder.
I'm playing with opus_demo, but I see no vestige of an option to enable fargan compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants