jigasi icon indicating copy to clipboard operation
jigasi copied to clipboard

VOSK transcription service no longer works with Jitsi 2.0.7830

Open charles-zablit opened this issue 2 years ago • 13 comments

Description

The transcription service no longer works when using VOSK with Jitsi 2.0.7830.

Current behavior

Whatever language you choose when starting the subtitles, it will not display the subtitles. However, when using Chrome DevTools, the network tab shows that the subtitles are received by the client through the websocket.

Expected Behavior

When clicking on the language which corresponds to the VOSK model, the subtitles should be displayed at the bottom of the screen, like they were on previous versions of Jitsi (prior to 2.0.7830).

Possible Solution

In the Jitsi-meet source code, there is a check that compares the requested language with the sent language, here. However, there is a hardcoded "C" as the language code sent to the jitsi-meet client, from Jigasi, here. Changing this "C" to "en-US" and selecting "English" in the subtitles menu in jitsi fixes the problem.

The fix boils down to receiving the language code requested by Jitsi in Jigasi.

Steps to reproduce

  1. Setup a working installation of jitsi meet with vosk subtitles.
  2. Upgrade to jitsi 2.0.7830.
  3. Enable the subtitles for any language.
  4. The subtitles do not appear.

Environment details

Jitsi 2.0.7830 and Jigasi HEAD

charles-zablit avatar Oct 03 '22 13:10 charles-zablit

Please, when you have questions or problems use the community forum before opening new issues, thank you.

Is your jigasi configured to authenticate using the hidden domain that is configured in config.js?

damencho avatar Oct 03 '22 13:10 damencho

Please, when you have questions or problems use the community forum before opening new issues, thank you.

Sorry about that, will open a thread ASAP on the forums 👍

Is your jigasi configured to authenticate using the hidden domain that is configured in config.js?

Yes, the hidden domain is configured and everything is working as expected on Jitsi 2.0.7648.

charles-zablit avatar Oct 03 '22 13:10 charles-zablit

No need to open a forum thread, no worries. I'm just noting that, cause this is the common practice, we discuss it there and once it is confirmed it is an issue then we or you open an issue in the related project as noted here: https://github.com/jitsi/jigasi/blob/master/.github/ISSUE_TEMPLATE/bug-report.md

damencho avatar Oct 03 '22 13:10 damencho

@tamasdomokos Can you take a look, please?

damencho avatar Oct 03 '22 13:10 damencho

@charles-zablit does VOSK support different languages?

damencho avatar Oct 03 '22 13:10 damencho

Never mind ignore my previous comment 🤦

damencho avatar Oct 03 '22 14:10 damencho

So you can create a PR fixing the language sent from VOSK transcription language ... I guess when someone changes its requested transcription language that will not work as google translation is not configured ... One option/hack will be when someone sets a language you just change the result language if that works, so everybody sees English no matter of the selected language ...

And the correct way is to add a feature whether jigasi supports translations and a change in UI that respects that and hides language selection when that is not supported and sticks to a default one.

damencho avatar Oct 03 '22 14:10 damencho

One option/hack will be when someone sets a language you just change the result language if that works, so everybody sees English no matter of the selected language ...

A "cleaner" hack would be to receive the language code requested by Jitsi and use that in VoskTranscriptionService to make sure it always matches. Could you please point me to where this information is available in Jigasi's code, if it is available?

charles-zablit avatar Oct 03 '22 14:10 charles-zablit

https://github.com/jitsi/jigasi/blob/e05924f9356d8fc3cbfeeb0003a0d27c5b4ea400/src/main/java/org/jitsi/jigasi/TranscriptionGatewaySession.java#L303

https://github.com/jitsi/jigasi/blob/171e240cb88a03e834bd495029cad4a8539a86c8/src/main/java/org/jitsi/jigasi/transcription/Transcriber.java#L412

https://github.com/jitsi/jigasi/blob/fb76d173eb643b94fb7ee10721af1a1647127ee9/src/main/java/org/jitsi/jigasi/transcription/Participant.java#L428

damencho avatar Oct 03 '22 14:10 damencho

Could you please point me to where this information is available in Jigasi's code, if it is available?

Nevermind, I found it 👍

EDIT: Just received your message, thanks!

charles-zablit avatar Oct 03 '22 14:10 charles-zablit

Hello @damencho

Do you know if I can get the value of this object in Jigasi?

My idea is to retrieve options.transcriptionLanguage which is set here in Jitsi, and use it to always return the correct transcription language in Jigasi.

WebRTC is still new for me :)

charles-zablit avatar Oct 04 '22 14:10 charles-zablit

Do you know if I can get the value of this object in Jigasi?

What is that? I don't understand and what is its relation to transcription?

My idea is to retrieve options.transcriptionLanguage which is set here in Jitsi, and use it to always return the correct transcription language in Jigasi.

This is being updated and the code of handling that I showed above: https://github.com/jitsi/jigasi/issues/448#issuecomment-1265531514

damencho avatar Oct 04 '22 15:10 damencho

Thanks! In the end, Jitsi does not even check for the translation language. It checks if the requested transcription language matches the user's UI language.

Imo this check shouldn't exist as it may be confusing for a user who does not have the same UI language as the requested language. The transcription will not work without any warning or error message. I've opened a PR jitsi/jitsi-meet#12325 for this on Jitsi-meet's repo.

charles-zablit avatar Oct 06 '22 14:10 charles-zablit