Jigasi

repository·master·Indexed 20 days ago

https://github.com/jitsi/jigasi

A server-side SIP gateway that allows regular SIP clients to join Jitsi Meet conferences. Jigasi provides real-time transcription and translation services, supporting providers such as Google Cloud Speech-to-Text, Vosk, Whisper, Oracle Cloud AI Speech, LibreTranslate, and Microsoft Translator.

Tokens
5.9K
Snippets
15
Records
22
Agent score
69%

What's inside jitsi-jigasi

  1. How Jigasi handles incoming SIP calls

    master

    Jigasi acts as a connector between SIP servers and Jitsi Meet. When receiving a SIP INVITE, it looks for a Jitsi-Conference-Room header to determine which conference to join.

    • With header: If the header contains room1234@conference.meet.example.com, Jigasi joins https://meet.example.com/room1234.
    • Without header: Jigasi joins the room specified by the org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME property in jigasi-home/sip-communicator.properties.
  2. Configure Google Cloud Speech-to-Text for transcription

    master

    To use Google Cloud Speech-to-Text, you must install the Google Cloud SDK and provide credentials to Jigasi.

    1. Install Google Cloud CLI (Debian/Ubuntu):
      curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
      echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
      sudo apt-get update && sudo apt-get install google-cloud-cli
      gcloud init
      gcloud auth application-default login
    2. Setup Credentials: Move the generated credentials to the Jigasi config directory and set permissions:
      mv /root/.config/gcloud/application_default_credentials.json /etc/jitsi/jigasi
      chown jigasi:jitsi /etc/jitsi/jigasi/application_default_credentials.json
    3. Update Jigasi Config: Add the following to /etc/jitsi/jigasi/config:
      GOOGLE_APPLICATION_CREDENTIALS=/etc/jitsi/jigasi/application_default_credentials.json
    # Credential for Google Cloud Speech API
    GOOGLE_APPLICATION_CREDENTIALS=/etc/jitsi/jigasi/application_default_credentials.json
  3. Configure Prosody for Jigasi brewery rooms

    master

    Jigasi requires a Multi-User Chat (MUC) component in your XMPP server (e.g., Prosody) to manage brewery rooms. If using Prosody, append the following configuration to /etc/prosody/prosody.cfg.lua or the relevant file in /etc/prosody/conf.d/.

    Note: Replace meet.example.com with your actual domain.

    Component "internal.auth.meet.example.com" "muc"
        storage = "memory"
        modules_enabled = {
          "ping";
        }
        admins = { "focus@auth.meet.example.com", "jigasi@auth.meet.example.com" }
        muc_room_locking = false
        muc_room_default_public_jids = true 
  4. Configure Oracle Cloud AI Speech for transcription

    master

    To use Oracle Cloud AI Speech, configure these properties in sip-communicator.properties:

    org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.OracleTranscriptionService
    org.jitsi.jigasi.transcription.oci.websocketUrl=wss://realtime.aiservice-<<ENV>>.<<REGION>>.oci.oraclecloud.com

    Ensure valid OCI credentials are placed under /usr/share/jigasi/.oci or set the OCI_CONFIG_FILE environment variable.

  5. Install and run Jigasi from source

    master

    To install Jigasi from source, follow these steps:

    1. Clone the repository:
      git clone https://github.com/jitsi/jigasi.git
    2. Build the project using Maven:
      cd jigasi
      mvn install -Dassembly.skipAssembly=false
    3. Extract the binary from the target/ directory. Choose the appropriate zip file for your OS (e.g., jigasi-linux-x64-{version}.zip, jigasi-linux-x86-{version}.zip, or jigasi-macosx-{version}.zip):
      cd target/
      unzip jigasi-{os-version}-{version}.zip
    4. Start Jigasi:
      cd jigasi/target/jigasi-{os-version}-{version}/
      ./jigasi.sh
    git clone https://github.com/jitsi/jigasi.git
    cd jigasi
    mvn install -Dassembly.skipAssembly=false
  6. Configure Jigasi for transcription

    master

    To use Jigasi as a transcription provider, you must configure a hidden domain in Prosody and update the Jitsi Meet configuration.

    1. Prosody Configuration: Add a VirtualHost for the recorder in /etc/prosody/conf.d/meet.example.com.cfg.lua:
      VirtualHost "recorder.meet.example.com"
        modules_enabled = {
          "ping";
        }
        authentication = "internal_hashed"
    2. Register Transcriber:
      prosodyctl register transcriber recorder.yourdomain.com jigasirecorderexamplepass
    3. Jitsi Meet Configuration: Edit /etc/jitsi/meet/meet.example.com-config.js:
      config.hiddenDomain = "recorder.meet.example.com";
      config.transcription = { enabled: true };
    4. Jigasi Configuration: Edit /etc/jitsi/jigasi/sip-communicator.properties:
      org.jitsi.jigasi.ENABLE_SIP=false
      org.jitsi.jigasi.ENABLE_TRANSCRIPTION=true
      org.jitsi.jigasi.xmpp.acc.USER_ID=transcriber@recorder.meet.example.com
      org.jitsi.jigasi.xmpp.acc.PASS=jigasirecorderexamplepass
      org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false
      org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true
  7. Configure Microsoft Translator for translation

    master

    To use Microsoft Translator, configure the following in sip-communicator.properties:

    org.jitsi.jigasi.transcription.translationService=org.jitsi.jigasi.transcription.BingTranslationService
    org.jitsi.jigasi.transcription.bing.subscription_key=<your-translator-key>
    org.jitsi.jigasi.transcription.bing.subscription_region=<your-resource-region>

    By default, the endpoint is https://api.cognitive.microsofttranslator.com and the API version is 3.0. To override these, use:

    org.jitsi.jigasi.transcription.bing.endpoint=https://api.cognitive.microsofttranslator.com
    org.jitsi.jigasi.transcription.bing.api_version=3.0
  8. Configure Vosk for transcription

    master

    To use a Vosk speech recognition server:

    1. Start Vosk (via Docker):
      docker run -d -p 2700:2700 alphacep/kaldi-en:latest
    2. Configure Jigasi in sip-communicator.properties:
      • Set the service: org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.VoskTranscriptionService
      • Set the URL (single instance): org.jitsi.jigasi.transcription.vosk.websocket_url=ws://localhost:2700
      • For multiple languages, use a JSON format: org.jitsi.jigasi.transcription.vosk.websocket_url={"en": "ws://localhost:2700", "fr": "ws://localhost:2710"}
    org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.VoskTranscriptionService
    # Single instance
    org.jitsi.jigasi.transcription.vosk.websocket_url=ws://localhost:2700
    # Multiple instances
    # org.jitsi.jigasi.transcription.vosk.websocket_url={"en": "ws://localhost:2700", "fr": "ws://localhost:2710"}
  9. Set up SIP and XMPP accounts for Jigasi

    master

    Jigasi requires a SIP account and an XMPP account for its control room (brewery).

    1. SIP Account: Edit jigasi/jigasi-home/sip-communicator.properties. Replace <<JIGASI_SIPUSER>> with your SIP username (e.g., user1232@sipserver.net) and <<JIGASI_SIPPWD>> with a Base64 encoded password.
    2. XMPP Account: Register the account in Prosody:
      prosodyctl register jigasi auth.meet.example.com topsecret
      Then, replace <<JIGASI_XMPP_PASSWORD_BASE64>> in sip-communicator.properties with the Base64 encoded version of the password (e.g., topsecret).
  10. Configure LibreTranslate for translation

    master

    To use LibreTranslate for translation:

    1. Run LibreTranslate (via Docker):
      docker run -d -p 5000:5000 libretranslate/libretranslate
    2. Configure Jigasi in sip-communicator.properties:
      org.jitsi.jigasi.transcription.translationService=org.jitsi.jigasi.transcription.LibreTranslateTranslationService
      org.jitsi.jigasi.transcription.libreTranslate.api_url=http://localhost:5000/translate
    org.jitsi.jigasi.transcription.translationService=org.jitsi.jigasi.transcription.LibreTranslateTranslationService
    org.jitsi.jigasi.transcription.libreTranslate.api_url=http://localhost:5000/translate
  11. Configure Whisper for transcription

    master

    To use a custom Whisper implementation (e.g., from jitsi/skynet), configure the following in sip-communicator.properties:

    org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.WhisperTranscriptionService
    org.jitsi.jigasi.transcription.whisper.websocket_url=wss://<YOUR-DOMAIN>:<PORT>/streaming-whisper/ws
  12. Configure Call Control MUCs (Brewery)

    master

    For outgoing calls, Jigasi uses a control room called a 'brewery' (an XMPP MUC). To use this, you must:

    1. Enable the brewery in sip-communicator.properties: org.jitsi.jigasi.BREWERY_ENABLED=true.
    2. Add an XMPP account to connect to the server. A sample configuration for an account jigasi@auth.meet.example.com is provided in the documentation.
    3. Configure Jicofo: The brewery room name must be registered in Jicofo using:
      • Property: org.jitsi.jicofo.jigasi.BREWERY=JigasiBrewery@internal.auth.meet.example.com
      • Or via HOCON: hocon -f /etc/jitsi/jicofo/jicofo.conf set jicofo.jigasi.brewery-jid '"JigasiBrewery@internal.auth.meet.example.com"'
    4. Configure Prosody: Ensure Prosody has a registered MUC component at internal.auth.meet.example.com.
    # Example XMPP account property for brewery
    net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.BREWERY=JigasiBrewery@internal.auth.meet.example.com