Jigasi built from source google cloud platform authentication

Hello everyone,

  1. I have tried running jigasi from source and I don’t know where I should I serve the google json credential to jigasi like i do with jigasi quick install (in the /etc/jitsi/jigasi/config)
  2. How do I get jigasi built from source running in the background like the one from quick install? I want to keep it running.

Thank you in advance!

([1] log)

2021-03-30 11:47:08.706 INFO: [128] org.jitsi.jigasi.transcription.GoogleCloudTranscriptionService.log() othercommandershitpresumably/7d7d5df0: sent 500ms to speech API, for a total of 1 intervals with a total of 1 requests.
2021-03-30 11:47:09.210 WARNING: [130] org.jitsi.jigasi.transcription.GoogleCloudTranscriptionService.log() othercommandershitpresumably/7d7d5df0: received an error from the Google Cloud API
com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the speech.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
        at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:55)
        at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
        at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
        at com.google.api.gax.grpc.ExceptionResponseObserver.onErrorImpl(ExceptionResponseObserver.java:82)
        at com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:86)
        at com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:149)
        at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
        at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
        at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
        at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:700)
        at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
        at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
        at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
        at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:399)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:510)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:66)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:630)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:518)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:692)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:681)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the speech.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
        at io.grpc.Status.asRuntimeException(Status.java:533)
        ... 23 more
2021-03-30 11:47:09.211 INFO: [130] org.jitsi.jigasi.transcription.GoogleCloudTranscriptionService.log() othercommandershitpresumably/7d7d5df0: sent 500ms to speech API, for a total of 1 intervals with a total of 1 requests.

You need env variable GOOGLE_APPLICATION_CREDENTIALS as described here:

1 Like

I got that working thank you so much, but how abt building it to run in the background? Do I build it to debian package? How do I build it?

One more thing, is this correctly setup for debugging btw?

If you are modifying just the jigasi code, the easiest way is to first install and have jigasi running, then just build the source code (mvn install) and get the SNAPSHOT jar from target folder, rename it to jigasi.jar and replace the one from /usr/share/jigasi and that’s it … if you add dependencies you need those jars to be available in libs folder in /usr/share/jigasi.

1 Like

Thank you so much I’ll try that
One more thing since you’re here could you please also help give me advice on this as well?
I’m testing out real-time translation, and it seems to be giving bad pair language request. I’m testing around not sure what should I change in order to get it working properly.

I’m trying to change the GoogleCloudTranslationService.java itself but it seems to still not the right one. it somehow still call the translation

Hello @damencho, after I tried what u suggest, everything’s running but the transcription’s sending a lot of requests (looping), everything was fine in my local

I don’t know what’s going on, is it relating to jigasi version or sth?

not sure what happened there after i tried building from source in my deployment server then copy the SNAPSHOT and did the same thing it works fine now.