Skip to content
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

with md380-emu, on raspberry pi, ambeframes are always 0 #1

Closed
Anubi61 opened this issue Mar 21, 2024 · 16 comments
Closed

with md380-emu, on raspberry pi, ambeframes are always 0 #1

Anubi61 opened this issue Mar 21, 2024 · 16 comments

Comments

@Anubi61
Copy link

Anubi61 commented Mar 21, 2024

Dear Nuno, it is two days I am on your source and I have the above problem (on DMRBot is the same).
Since I don't have a dv stick I am using the emulator from dvswitch setup.
After adding some debug instructions (just to see if the buffer has something, what it contains and is sent or not to the emulator)
I am sure that all the voice frames are sent to the emu but nothing received back.
Suggestions ?

@narspt
Copy link
Owner

narspt commented Mar 21, 2024

Hi, md380emu from from dvswitch setup will not work, the "ambe server" on that one is a very basic thing just to be sent raw ambe/pcm packets to/from, that md380emu version is really only usable for dvswitch, nothing else. You need to get and compile md380emu from my fork (as stated at end of DMRBot readme), my version is a different thing, it emulates a "true ambe server" with AMBE3000 command-set emulation (most used commands), you should be able to use this version with any software that works with a real AMBEServer+AMBE3000, except that it doesn't do D-Star bitrate...

@Anubi61
Copy link
Author

Anubi61 commented Mar 21, 2024

Obrigado.
I already tried with it, some times ago,received a ton of compilation errors. But I will give a try again, perhaps I will be more lucky this turn:

@narspt
Copy link
Owner

narspt commented Mar 21, 2024

You should just need to "git clone" it, then "cd emulator", then "make". If you are able to compile DVSwitch version then you should also be able to compile mine, there are no extra dependencies, maybe you need to install some package on your system, let me know if you get any errors maybe I can help you.

@Anubi61
Copy link
Author

Anubi61 commented Mar 22, 2024

Many thanks, did myself. Had to install python2 plus some gcc libraries to compile md380, but finally worked. Tested last night, goes fine. Today I tried a modification of the logic in order to let the assistant answer back only if someone call it directly, otherway if I run it on a wide group answer to anyone start a transmission.
I used my callsign as key string and it works fine too.
Thanks a lot, best regards.

@narspt
Copy link
Owner

narspt commented Mar 22, 2024

Great that you got it working (note that you can use my emu even with bluedv for dmr/ysf, but David doesn't seem to like that sort of things, he only supports genuine dvsi). Concerning your DMRBot change to reply only when called, having it on a wide group... I did think about that before but never did it because speech recognition takes time to process... users need to wait that time between transmissions... and there are api costs always running for every transmission on wide group, not sure how good it would work? I think a dedicated TG is more efficient for it.

@Anubi61
Copy link
Author

Anubi61 commented Mar 23, 2024

Nuno, I agree, but unfortunately for our group the use of our cluster's TG is mandatory.
I am testing other platforms, I'd like to have the speach recognition all offline and perhaps having the speach generation offline too.
Tested piper for the generation side. Good but not so good (the italian voice is really scaring me, seem a psycho man. LOL).
Searches are undergoing.
Best regards :)

@narspt
Copy link
Owner

narspt commented Mar 23, 2024

I did test some other things before as well, either offline or online, these was the best I could find (but don't really know how good it works for Italian)... for speech recognition I did test google api (online) and found it worse than openai whisper, no multi-language detection and even on pre-set language much more prone to false transcriptions than whisper even on english... I did run live tests with both working simultaneously and then looked at logs daily to see recognition from one and the other... I doubt there are offline speech recognition better than these... As for synthesizer I did test some offline but most with bad quality, worst on non-english as you say... I find google ones to work very well, fast, no errors... the fact that they depend on online, well you need online anyway for chatgpt api... but good luck on your research and if you want to fork my repo to include your changes feel free, always good to see :)

@Anubi61
Copy link
Author

Anubi61 commented Mar 24, 2024

Ha! My research are almost stalled. Despite the nice websites (that promise everything), interesting projects etc, the open source offline solutions perhaps are focused on english and very less on other languages. It is on obvious thought: who can compete with M$, Amazon or Google with their dedicated clustered servers ? I still have the last try: using M$ SpeechRecognition API then I am done. I know I know, it is like to shoot a mosquito with a gun :) Other Idea I have is to wakeup the bot from DVSwitch mobile application, then let it work until a configured timeout, then he goes standby again. This can be done via macro commands to dvswitch server. The odd side is that I cannot do it via a radio connection, with dtmf for example.
Be sure I will fork your dmrrec if I find a practical use to my purpose. Thanks a lot for the chat, it is always a pleasure to talk with a colleague sw-engineer.

@narspt
Copy link
Owner

narspt commented Mar 24, 2024

dtmf detection would be possible, the best way would be to implement it on dmr client (the .c) checking the ambe frames directly, frames containing dtmf are "special", not normal audio frames... I'm not fully sure how to do it or how easy but I know it's possible, that is done for dstar on irddbgateway, maybe also on ysfgateway? or you could probably also try an external program to just detect dtmf on ambe decoded rx.wav?
Also pleased to chat with you, always good to share experiences and I'm not sw-engineer, just a hobby coder :)

@Anubi61
Copy link
Author

Anubi61 commented Mar 24, 2024

For what I know, dtmf can be transmitted over C4FM (ysf/x-wire) for sure. On DMR it should, unfortunately my handy radio doesn't. Perhaps because the customized firmware ? Who knows ;) I'll investigate on it too. Best regards. IU4QTF Martino.

@Anubi61
Copy link
Author

Anubi61 commented Mar 29, 2024

Nuno, did you ever tried this: https://github.com/SYSTRAN/faster-whisper ?
Offline stt based on whisper acoustic models.
I am testing now, seems very very reliable.

@narspt
Copy link
Owner

narspt commented Mar 29, 2024

Never tried it, looks interesting indeed, is it fast on modest hardware server?

@Anubi61
Copy link
Author

Anubi61 commented Apr 19, 2024

I used for testing pupose, downloaded all the acoustic models and tried them all. The hardware was a simple xeon server without anu gpu ( if you can run on a nvidia with cuda engine, probably works at its best). In terms of recognition the best is the 1.5Gb model, but this increase greatly the time. In any case it is really a faster-whisper :) Now projects on hold because I am involved into an activation (Award) for the 150th years of birth of Marconi, so my free time slots are dedicated to the radio only. Will be back on May.

@narspt
Copy link
Owner

narspt commented Apr 22, 2024

Thanks for your information. Good luck with your activation activity.

@Anubi61
Copy link
Author

Anubi61 commented Apr 30, 2024

Nuno I have a question/request for you, can you give me an email so we let this "issue" free ?

@narspt
Copy link
Owner

narspt commented Apr 30, 2024

I did send you an email, check spam if you don't get it or let me know (I say this because I had recent reports of gmail users getting my emails flagged incorrectly as spam for some weird reason, i.e. probably because my email is not gmail)

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