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

Enable VOSK Transcription #1343

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

janonym1
Copy link

@janonym1 janonym1 commented Jul 5, 2022

this creates 2 (maybe) new ENV variables to allow for easier VOSK integration. Per default, it is assumed GCLOUD is always used and that makes it hard(er) to set up VOSK within docker-jitsi-meet

I still need to add the GCLOUD check and set for the ENV GOOGLE_APPLICATION_CREDENTIALS /config/key.json within the run script (jigasi/rootfs/etc/services.d/jigasi/run) but I am not sure how to best approach this. Maybe lets define an additional variable (ENABLE_GCLOUD_TRANSCRIPTION) and use that?

@janonym1
Copy link
Author

janonym1 commented Jul 5, 2022

I added a new var ENABLE_GCLOUD_TRANSCRIPTION but I am not sure, if my code at jigasi/rootfs/etc/services.d/jigasi/run seting the GCLOUD ENV for the key.json is working as intended

@janonym1
Copy link
Author

janonym1 commented Jul 5, 2022

I also am not sure, if it would be better/nicer if we can chain the check for the GCLOUD creds in the 10-config:

I wanted to AND together the following checks:
if [[ ($ENABLE_TRANSCRIPTIONS -eq 1 || $ENABLE_TRANSCRIPTIONS == "true") && ($ENABLE_VOSK -eq 0 || $ENABLE_VOSK == "false") && ($ENABLE_GCLOUD_TRANSCRIPTION -eq 1 || $ENABLE_GCLOUD_TRANSCRIPTION == "true") ]] but that isnt working as I imagined it. I assume I am misunderstanding some syntaxes here?

jigasi/rootfs/etc/cont-init.d/10-config Outdated Show resolved Hide resolved
jigasi/rootfs/defaults/sip-communicator.properties Outdated Show resolved Hide resolved
jigasi.yml Outdated Show resolved Hide resolved
jigasi/rootfs/etc/services.d/jigasi/run Outdated Show resolved Hide resolved
Copy link
Author

@janonym1 janonym1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the requested changes

@janonym1 janonym1 requested a review from saghul July 6, 2022 08:39
@debendraoli
Copy link
Contributor

Is there anything left to do? I would be happy to help.

It would be very useful when this gets merged. Thanks

@janonym1
Copy link
Author

Is there anything left to do? I would be happy to help.

It would be very useful when this gets merged. Thanks

I updated the requested changes (e.g. the variablenaming ENABLE_VOSK_TRANSCRIPTION) but I need to test it out on my testsystem first, which I unfortunately didnt get around to yet. If I botched up something, I also break the GCLOUD transcription ability, which more users seem to use than VOSK :)

Also I am not sure about the logic, that checks if transcriptions are on (but not gcloud) which I will get around to next week hopefully

@charles-zablit
Copy link
Contributor

charles-zablit commented Oct 5, 2022

Hi, is there any update on this, and is there anything I can do to help?

Copy link

@HarHarLinks HarHarLinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems to me one variable was missed when renaming

jigasi/rootfs/etc/cont-init.d/10-config Outdated Show resolved Hide resolved
@rouaidakacem
Copy link

@janonym1 is there an update on this ? Would love to help if necessary.

@HarHarLinks
Copy link

HarHarLinks commented Nov 30, 2022

@debendraoli @charles-zablit @rouaidakacem and everyone else asking to help: could you test this PR and report if it works, and in case you have to make any changes, which ones? Because even with my proposed change, I can't get this to work.

Co-authored-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com>
@saiflakhani
Copy link

Been patiently waiting for this, hoping to see this in a release soon! Would love to help/test if there's an update on this

@saghul
Copy link
Member

saghul commented Sep 11, 2023

There is currently a conflict that needs to be fixed.

@krombel krombel mentioned this pull request Dec 4, 2023
@loelkes
Copy link

loelkes commented Jan 30, 2024

Hi @saghul What needs to be done here? I would like to help. It looks like the changes you requested have not been reviewed by you. Or have I missed something?

How can I/we help to get this merged?

@saghul
Copy link
Member

saghul commented Jan 31, 2024

Yep, conflicts are yet to be solved.

@loelkes
Copy link

loelkes commented Jan 31, 2024

@saghul I understand that. But from what I can see, the changes you requested have been made but not reviewed. Can you review them and point out the remaining conflicts?

I don't have write access here, so all I could do was create a new branch/PR to address the conflicts there.

@saghul
Copy link
Member

saghul commented Jan 31, 2024

Please do that. I can't merge the PR as is, even if the feedback was addressed, because there are conflicts.

@janonym1
Copy link
Author

Sorry, I must have overlooked the activity here. I solved the conflicts but I think I have a bug somehwere in the logic. Let me look for my hardcoded values (since it worked for me before) and crosscheck with the effective values here

@@ -12,6 +12,8 @@ services:
- ${CONFIG}/transcripts:/tmp/transcripts:Z
environment:
- ENABLE_AUTH
- ENABLE_GCLOUD_TRANSCRIPTION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not backwards compatible. I'd say we should either repurpose ENABLE_TRANSCRIPTIONS to take a boolean (default to gcloud) or the type of transcription.

Alternatively some TRANSCRIPTION_BACKEND_TYPE which one could set to google or vosk

@@ -1,4 +1,7 @@
#!/usr/bin/with-contenv bash
if [[ -f /config/key.json ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check the transcriber type I think, simpler for testing switching between them.

@@ -8,6 +8,9 @@
{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}}
{{ $ENABLE_VOSK_TRANSCRIPTION := .Env.ENABLE_VOSK_TRANSCRIPTION | default "0" | toBool -}}
{{ $ENABLE_GCLOUD_TRANSCRIPTION := .Env.ENABLE_GCLOUD_TRANSCRIPTION | default "0" | toBool -}}
{{ $VOSK_SERVER := .Env.VOSK_SERVER}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary if you are not going to apply any transformation, you can use .Env.VOSK_SERVER directly.

@zobadaniel
Copy link

I have a simlar patch, so I'd rather 👍 this than to post my own. I am also willing to help in order to get this merged.

@janonym1
Copy link
Author

I forgot to add, that you have to have a working SIP setup (server+account) and config for VOSK to work.
Should I just assume it is setup or make a check (e.g. if JIGASI_SIP_URI is set)?

I also do not seem to get around the GCLOUD restriction; it needs to have a jigasi/config/key.json with valid credentials even when GCLOUD is deactivated. I am not sure how to get around this, maybe mock the credentials?

@damencho
Copy link
Member

I forgot to add, that you have to have a working SIP setup (server+account) and config for VOSK to work.
Should I just assume it is setup or make a check (e.g. if JIGASI_SIP_URI is set)?

This is not a jigasi issue, this is configuration issue and should be fixed, maybe in this PR?

@saghul
Copy link
Member

saghul commented Mar 27, 2024

I think I fixed that already. If you set ENABLE_TRANSCRIPTIONS the sip config is skipped now.

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

Successfully merging this pull request may close these issues.

None yet

10 participants