This document provides instructions for managing the Speech-to-Text (STT) Demo Platform services on Ubuntu.
The STT Demo Platform consists of several interconnected services that work together to provide a comprehensive speech-to-text solution. The main components are:
- A Python-based backend running in an Anaconda environment, managed by systemd and the user
stt_service
. - A frontend website running in a Docker container
- Nginx for port forwarding, configured at
/etc/nginx/sites-enabled/default
Three Python services work together to offer the long_api:
-
Transcription Service (
whisper_transcribe/transcribe.py
)- Continuously scans a folder for .mp3 files to transcribe
- Managed by
stt-transcribe.service
-
Upload Service (
whisper_transcribe/upload.py
)- Provides a web interface for uploading .mp3 files to the server
- Managed by
stt-uploader.service
- Accessible via https://stt4sg.fhnw.ch/long_v3/
-
Status Service (
whisper_transcribe/status.py
)- Offers a web interface to check transcription status
- Allows users to download transcriptions in various formats
- Managed by
stt-status.service
- Accessible via https://stt4sg.fhnw.ch/long_v3/status/
-
Short Transcription Service (
stt/app.py
)- Provides a web interface for short transcriptions
- Managed by
stt.service
- Accessible via https://stt4sg.fhnw.ch/stt/
They are deployed by an user stt_service
, have an conda enviroment stt_env
and their deployment is managed by systemd.
The main website is hosted in a Docker container:
- Configuration:
/srv/stt-demo-platform/docker-compose.yml
- Source code:
/srv/stt-demo-platform/stt4sg-demo-app
- URL: https://stt4sg.fhnw.ch/
To make changes to the main website:
- Edit the files in
/srv/stt-demo-platform/stt4sg-demo-app
- Rebuild the Docker container:
sudo docker compose up -d --build frontend
You can manage the STT services using systemd commands. For example:
- Start a service:
sudo systemctl start stt-uploader.service
- Stop a service:
sudo systemctl stop stt-transcribe.service
- Restart a service:
sudo systemctl restart stt-status.service
- Check service status:
sudo systemctl status stt-uploader.service
To view the most recent logs for a service in real-time:
sudo journalctl -u <service-name> -f
- Edit the service file:
sudo nano /etc/systemd/system/<service-name>.service
- After making changes, reload the systemd manager:
sudo systemctl daemon-reload
- Restart the service to apply changes:
sudo systemctl restart <service-name>