Jitsi has developed Skynet that employs Fast Whisper for transcriptions https://github.com/jitsi/skynet Skynet is an API server for various AI services and also offers summaries.
Here is the ChatGPT guide for using Jigasi with Whisper.
To deploy Jigasi and Skynet in Kubernetes using Kustomize and enable transcription using Whisper, you'll follow a systematic approach to:
Set up Jigasi to handle audio transcription.
Deploy a Skynet API server to handle Whisper transcription requests (or connect Jigasi to an existing Skynet API endpoint).
Use Kustomize to manage the Kubernetes deployment, allowing you to configure environments like production or staging.
Steps Overview:
Jigasi Deployment Configuration in Kubernetes:
Set up Jigasi to run as a container in your Kubernetes cluster.
Configure Jigasi for transcription (integrating Skynet Whisper API for transcription).
Skynet API Deployment (or connection to an existing API):
Deploy Skynet if you're running it yourself, or point Jigasi to the external Skynet API server.
Configure Kustomize:
Use Kustomize to manage overlays for different environments (e.g., production and staging).
Let’s break it down in detail:
1. Jigasi Deployment in Kubernetes
You need to define a Kubernetes Deployment for Jigasi with appropriate environment variables and configurations to enable transcription. Here's how you can configure the Jigasi deployment YAML file:
base/jigasi-deployment.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:jigasilabels:app:jigasispec:replicas:1selector:matchLabels:app:jigasitemplate:metadata:labels:app:jigasispec:containers:-name:jigasiimage:jitsi/jigasi:latestenv:-name:JIGASI_SIP_URIvalue:"sip:example@domain.com"# SIP URI for the service-name:JIGASI_XMPP_SERVERvalue:"xmpp-server.jitsi.example.com"# XMPP server for Jitsi Meet-name:JIGASI_TRANSCRIBEvalue:"true"# Enable transcription-name:JIGASI_TRANSCRIPTION_SERVICEvalue:"SkynetTranscriptionService"# Custom transcription service for Skynet API-name:SKYNET_API_ENDPOINTvalue:"<SkynetAPIendpoint>"# Endpoint for Skynet API server-name:SKYNET_API_KEYvalueFrom:secretKeyRef:name:skynet-api-keykey:apiKey# Reference secret for Skynet API keyports:-name:sipcontainerPort:5060# SIP port-name:httpcontainerPort:8080# HTTP port for health checks, etc.
In this configuration:
JIGASI_TRANSCRIBE is set to true to enable transcription.
JIGASI_TRANSCRIPTION_SERVICE points to a custom transcription service that integrates with the Skynet API.
Environment variables SKYNET_API_ENDPOINT and SKYNET_API_KEY are set to configure access to the Skynet Whisper API.
2. Skynet API Deployment
If you're running your own Skynet API for Whisper transcription, you can deploy it as a service in Kubernetes.
base/skynet-deployment.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:skynetlabels:app:skynetspec:replicas:1selector:matchLabels:app:skynettemplate:metadata:labels:app:skynetspec:containers:-name:skynet-apiimage:skynet-api:latest# Your Skynet API imageports:-name:httpcontainerPort:8000env:-name:SKYNET_WHISPER_MODELvalue:"fast-whisper"# Set to use the fast Whisper model
This sets up Skynet to expose an API that Jigasi will use for transcription.
3. Kustomize Configuration
You’ll use Kustomize to manage the deployment of Jigasi and Skynet across different environments (e.g., staging, production).
Base kustomization.yaml:
Create a base kustomization.yaml file in the base/ directory, which includes both the Jigasi and Skynet resources:
This kustomization.yaml will apply the base resources but also include production-specific patches.
overlays/production/production-jigasi-patch.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:jigasispec:replicas:3# Set more replicas for productiontemplate:spec:containers:-name:jigasienv:-name:JIGASI_SIP_URIvalue:"sip:prod@domain.com"# Production SIP URI-name:JIGASI_XMPP_SERVERvalue:"xmpp-server-prod.jitsi.example.com"
overlays/production/production-skynet-patch.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:skynetspec:replicas:2# More replicas for Skynet API in production
This patch updates Jigasi and Skynet for production by increasing replicas and changing configuration values.
This will apply staging-specific settings such as fewer replicas, different API keys, or alternate endpoints.
Running the Deployments with Kustomize
Once everything is set up, you can deploy Jigasi and Skynet to your Kubernetes cluster.
For production:
kubectl apply -k overlays/production
For staging:
kubectl apply -k overlays/staging
4. Custom Transcription Service for Skynet
To enable Jigasi to use Skynet for transcription, you’ll need to implement a custom transcription service in Jigasi. Here’s a simplified workflow for how it might work:
Jigasi streams audio from a conference.
The audio is sent to Skynet’s Whisper API for transcription.
Skynet returns the transcription result, which is forwarded back to Jitsi Meet for display.
You’ll need to develop or configure Jigasi to send audio streams to the Skynet API using the environment variables provided in the Jigasi deployment.
For example, you can modify Jigasi’s internal transcription handler to use the Skynet API:
publicclassSkynetWhisperTranscriptionServiceimplementsTranscriptionService{@OverridepublicStringtranscribeAudio(byte[]audioData){Stringtranscription=sendAudioToSkynet(audioData);returntranscription;}privateStringsendAudioToSkynet(byte[]audioData){// API call to Skynet for Whisper transcription// Convert audioData into proper format (e.g., WAV)// Make an HTTP request to Skynet's API// Return the transcription}}
5. Secrets Management (Optional)
For better security, use Kubernetes Secrets to store sensitive data like the Skynet API key. Define a secret in your Kubernetes cluster and reference it in your Jigasi deployment.
By using Kustomize to deploy both Jigasi and Skynet, you can flexibly manage different environments and easily scale or reconfigure your deployment as needed. Integrating Jigasi with Skynet for transcription involves configuring both services to communicate, and once this is complete, you’ll have real-time transcription enabled for your Jitsi conferences using Whisper.
To deploy Jigasi and Skynet in Kubernetes using Kustomize and enable transcription using Whisper, you'll follow a systematic approach to:
Set up Jigasi to handle audio transcription.
Deploy a Skynet API server to handle Whisper transcription requests (or connect Jigasi to an existing Skynet API endpoint).
Use Kustomize to manage the Kubernetes deployment, allowing you to configure environments like production or staging.
Steps Overview:
Jigasi Deployment Configuration in Kubernetes:
Set up Jigasi to run as a container in your Kubernetes cluster.
Configure Jigasi for transcription (integrating Skynet Whisper API for transcription).
Skynet API Deployment (or connection to an existing API):
Deploy Skynet if you're running it yourself, or point Jigasi to the external Skynet API server.
Configure Kustomize:
Use Kustomize to manage overlays for different environments (e.g., production and staging).
Let’s break it down in detail:
1. Jigasi Deployment in Kubernetes
You need to define a Kubernetes Deployment for Jigasi with appropriate environment variables and configurations to enable transcription. Here's how you can configure the Jigasi deployment YAML file:
base/jigasi-deployment.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:jigasilabels:app:jigasispec:replicas:1selector:matchLabels:app:jigasitemplate:metadata:labels:app:jigasispec:containers:-name:jigasiimage:jitsi/jigasi:latestenv:-name:JIGASI_SIP_URIvalue:"sip:example@domain.com"# SIP URI for the service-name:JIGASI_XMPP_SERVERvalue:"xmpp-server.jitsi.example.com"# XMPP server for Jitsi Meet-name:JIGASI_TRANSCRIBEvalue:"true"# Enable transcription-name:JIGASI_TRANSCRIPTION_SERVICEvalue:"SkynetTranscriptionService"# Custom transcription service for Skynet API-name:SKYNET_API_ENDPOINTvalue:"<SkynetAPIendpoint>"# Endpoint for Skynet API server-name:SKYNET_API_KEYvalueFrom:secretKeyRef:name:skynet-api-keykey:apiKey# Reference secret for Skynet API keyports:-name:sipcontainerPort:5060# SIP port-name:httpcontainerPort:8080# HTTP port for health checks, etc.
In this configuration:
JIGASI_TRANSCRIBE is set to true to enable transcription.
JIGASI_TRANSCRIPTION_SERVICE points to a custom transcription service that integrates with the Skynet API.
Environment variables SKYNET_API_ENDPOINT and SKYNET_API_KEY are set to configure access to the Skynet Whisper API.
2. Skynet API Deployment
If you're running your own Skynet API for Whisper transcription, you can deploy it as a service in Kubernetes.
base/skynet-deployment.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:skynetlabels:app:skynetspec:replicas:1selector:matchLabels:app:skynettemplate:metadata:labels:app:skynetspec:containers:-name:skynet-apiimage:skynet-api:latest# Your Skynet API imageports:-name:httpcontainerPort:8000env:-name:SKYNET_WHISPER_MODELvalue:"fast-whisper"# Set to use the fast Whisper model
This sets up Skynet to expose an API that Jigasi will use for transcription.
3. Kustomize Configuration
You’ll use Kustomize to manage the deployment of Jigasi and Skynet across different environments (e.g., staging, production).
Base kustomization.yaml:
Create a base kustomization.yaml file in the base/ directory, which includes both the Jigasi and Skynet resources:
This kustomization.yaml will apply the base resources but also include production-specific patches.
overlays/production/production-jigasi-patch.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:jigasispec:replicas:3# Set more replicas for productiontemplate:spec:containers:-name:jigasienv:-name:JIGASI_SIP_URIvalue:"sip:prod@domain.com"# Production SIP URI-name:JIGASI_XMPP_SERVERvalue:"xmpp-server-prod.jitsi.example.com"
overlays/production/production-skynet-patch.yaml:
apiVersion:apps/v1kind:Deploymentmetadata:name:skynetspec:replicas:2# More replicas for Skynet API in production
This patch updates Jigasi and Skynet for production by increasing replicas and changing configuration values.
This will apply staging-specific settings such as fewer replicas, different API keys, or alternate endpoints.
Running the Deployments with Kustomize
Once everything is set up, you can deploy Jigasi and Skynet to your Kubernetes cluster.
For production:
kubectl apply -k overlays/production
For staging:
kubectl apply -k overlays/staging
4. Custom Transcription Service for Skynet
To enable Jigasi to use Skynet for transcription, you’ll need to implement a custom transcription service in Jigasi. Here’s a simplified workflow for how it might work:
Jigasi streams audio from a conference.
The audio is sent to Skynet’s Whisper API for transcription.
Skynet returns the transcription result, which is forwarded back to Jitsi Meet for display.
You’ll need to develop or configure Jigasi to send audio streams to the Skynet API using the environment variables provided in the Jigasi deployment.
For example, you can modify Jigasi’s internal transcription handler to use the Skynet API:
publicclassSkynetWhisperTranscriptionServiceimplementsTranscriptionService{@OverridepublicStringtranscribeAudio(byte[]audioData){Stringtranscription=sendAudioToSkynet(audioData);returntranscription;}privateStringsendAudioToSkynet(byte[]audioData){// API call to Skynet for Whisper transcription// Convert audioData into proper format (e.g., WAV)// Make an HTTP request to Skynet's API// Return the transcription}}
5. Secrets Management (Optional)
For better security, use Kubernetes Secrets to store sensitive data like the Skynet API key. Define a secret in your Kubernetes cluster and reference it in your Jigasi deployment.
By using Kustomize to deploy both Jigasi and Skynet, you can flexibly manage different environments and easily scale or reconfigure your deployment as needed. Integrating Jigasi with Skynet for transcription involves configuring both services to communicate, and once this is complete, you’ll have real-time transcription enabled for your Jitsi conferences using Whisper.
Yes, you need to create an XMPP user in Prosody that matches the JIGASI_XMPP_PASSWORD and ensure it is persistent so that the user account remains available across container restarts or upgrades. Below are the steps to achieve this:
1. Create the XMPP User in Prosody
In a typical Jitsi setup, Prosody is used as the XMPP server. You can use the prosodyctl command to add a user.
Inside the Prosody Container
Access the Prosody container:
kubectl exec-it <prosody-pod-name> -- /bin/bash
Replace <prosody-pod-name> with the name of the Prosody pod running in your Kubernetes cluster.
Replace jigasi with the username you want to use for Jigasi.
Replace xmpp-server.example.com with the domain of your Prosody server (usually matches the value of JIGASI_XMPP_SERVER).
Replace YOUR_PASSWORD with the desired password that matches the value in JIGASI_XMPP_PASSWORD.
Exit the container after the user is created:
exit
2. Make the XMPP User Persistent
By default, Prosody stores user data in files or a database. For persistence across container restarts or updates, ensure that Prosody’s data directory is backed by a persistent volume.
a. Verify Persistent Storage for Prosody
Check if the Prosody data is stored on a persistent volume in Kubernetes. The data directory typically contains prosody.cfg.lua and user data files.
If Prosody uses a persistent volume, verify it in the deployment YAML file or Helm chart:
If you want to automate the creation of the jigasi user, you can include the prosodyctl command in the Prosody container’s startup script. Modify the container’s entrypoint to check if the user exists, and create it if it doesn’t.
Example Startup Script:
#!/bin/bash# Check if the Jigasi user existsUSER_EXISTS=$(prosodyctl show users | grep jigasi)if[-z"$USER_EXISTS"];thenecho"Creating Jigasi XMPP user..." prosodyctl register jigasi xmpp-server.example.com YOUR_PASSWORDfi# Start Prosodyexec prosody
Mount this script into the container as an executable file, or build a custom Prosody image with this script as the entrypoint.
4. Testing
After creating the user, ensure that Jigasi can authenticate with Prosody:
Verify the user exists:
kubectl exec-it <prosody-pod-name> -- prosodyctl show users
You should see the jigasi user listed.
Restart the Jigasi deployment to test authentication:
kubectl rollout restart deployment/jigasi
Check Jigasi logs for successful authentication:
kubectl logs -lapp=jigasi
Look for log messages indicating that Jigasi connected successfully to the XMPP server.
Conclusion
To make the JIGASI_XMPP_PASSWORD user persistent:
Create the user using prosodyctl inside the Prosody container.
Ensure Prosody’s data directory is backed by a Kubernetes persistent volume.
Optionally, automate user creation in the Prosody container’s startup script.
This setup ensures the XMPP user exists consistently and supports Jigasi authentication seamlessly.