Replies: 13 comments
-
Have you tried coding speech with Lyra in realtime on an MD380-class handheld? |
Beta Was this translation helpful? Give feedback.
-
No but V2 of the codec is fairly efficient and may well be possible on the 100-400 MHz arm cores we see in radios today.
Of course this is something that needs to be evaluated.
|
Beta Was this translation helpful? Give feedback.
-
Interesting. Try it out and tell us if it's feasible. |
Beta Was this translation helpful? Give feedback.
-
I don't have a radio to test this on. I won't be able to work on this now - just wanted to mention it as an interesting option. In the future I may evaluate this for another unrelated project and will report back if I do. |
Beta Was this translation helpful? Give feedback.
-
Lyra V2 appears to run about 35x realtime on a modern phone core so my guess is that a 400Mhz Arm7 core will easily be fast enough. The STM32F405VG @ 168MHz would probably also be able to handle it but that would require testing. Some useful information on embedded Lyra V1 which is much slower: https://stackoverflow.com/questions/71415999/google-lyra-on-bare-metal-microcontroller |
Beta Was this translation helpful? Give feedback.
-
Moving this to Discussions, as it's not really an issue. |
Beta Was this translation helpful? Give feedback.
-
I suspect it'll be difficult to run in realtime on the MD-380 while also doing other things - but the dual core ESP32s will probably have no trouble, if I had to guess. Maybe this could be something for M17.2 or whatever versioning scheme gets used. As I remember it, old Lyra didn't open source everything, only some parts. This looks like they have now opened everything for v2? Something also to keep in mind - at least some people flat-out can't understand Lyra1, my dad is one of them. Play any random Lyra1 example to him and something there just doesn't work. For hams we might consider large-ish scale A/B testing of codecs to see which actually perform best for ham usage. I'm excited to see if Lyra2 is better. Make sure when you do comparison testing you listen to the Lyra version first before the raw version, else your brain can trick you more easily. |
Beta Was this translation helpful? Give feedback.
-
I believe Lyra V2 is now completely open sourced. The project is also emphasizing performance enhancements and even though embedded targets are not yet directly supported, the underlying TensorFlow.Lite library is embedded-friendly. One big aspect to adapting Lyra to M17 might be to remove stdlib dependencies like malloc if it has those. TensorFlow.Lite already supports stdlib-free embedded systems I believe. Yes, the only way to really compare codec 2 with Lyra V2 is by using the same samples. The Codec 2 samples I have heard are based on very low bandwidth original samples while the Lyra V2 samples are higher fidelity in an Irish accent. But based on what I heard from the existing samples it seems Lyra V2 is much better sounding and more intelligible. The thing that is most exiting is the fact that the audio no longer needs to be cellular style quality of 8KHz. It can be 16KHz! |
Beta Was this translation helpful? Give feedback.
-
What is the proposal here?
Really, it comes down to whether this is a "now" request or a "someday" request. I think it's valid as a "someday" request, and should probably come with a pull-request as a "now" request. :-) |
Beta Was this translation helpful? Give feedback.
-
For when this is something to be defined or implemented here is my 2 cents (from someone not familiar with the M17 code base so forgive my ignorance):
|
Beta Was this translation helpful? Give feedback.
-
Reading a bit more about Lyra V2 it seems that in addition to stdlib dependencies, the memory footprint may be a blocking issue for embedded applications. I did not find specifics for the current version but the requirements may currently be well beyond the stm32. |
Beta Was this translation helpful? Give feedback.
-
Again, is this request about adding it to the Spec, which will outlast current hardware limitations? Or is it about implementing on current development hardware? If it's about adding it to the Specification, current hardware limitations shouldn't prevent that. Hardware will only get better and someday, Lyra V2 will be possible. If there isn't anything else preventing it from being added to the spec (there might be; I really don't know), then I see no reason not to add it, and assign it a CODEC number in the protocol. |
Beta Was this translation helpful? Give feedback.
-
@SmittyHalibut It would be nice to have now but I think there will be considerable implementational complexity and it will be better to wait until the Lyra code base is more embedded-friendly. |
Beta Was this translation helpful? Give feedback.
-
The Lyra v2 codec supports 20ms 3200bps frames just like codec 2 so it would be a drop-in codec 2 replacement for that mode. A cursory look indicates that lyra V2 audio quality is considerably higher than codec 2 at this bit rate. Also the source code is c++ so easy to integrate with M17.
It's just a thought but this would put audio quality far above what DMR and the other protocols provide - the type of advantage that could propel M17 into the mainstream.
Beta Was this translation helpful? Give feedback.
All reactions