Skip to content

nzilbb/webscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webscribe

Simple web service for audio transcription

This is a web service that allows upload of a wav file and returns a transcript in the desired format.

Webscribe uses the nzilbb.ag annotation graph automation framework which includes:

  • An abstract object model for modelling speech acts (Annotation Graphs)
  • Transcriber implementations that integrate with different ASR systems in order to create annotation graphs representing transcripts of recordings.
  • Serializer implementations that transform annotation graphs into different tool formats, e.g. ELAN, Praat TextGrid, WebVTT subtitles, etc.

The default implementation uses WhisperX (based on OpenAI's WhisperX) speech-to-text (STT) system for transcription and optionally diarization, and includes download as ELAN transcript or Praat TextGrid.

Installation

These instructions assume installation on a Linux-based server.

Prerequisites include:

  • at least version 3.7 of python (sudo yum install python3.8 && sudo alternatives --set python3 /usr/bin/python3.8)
  • python's developer package (sudo yum install python38-devel.x86_64)
  • pip3 (sudo yum install python3-pip)
  • venv (sudo yum install python3-all-venv)
  • ffmpeg (sudo yum install ffmpeg)
  • Apache Tomcat (sudo yum install tomcat)
  1. Copy webscribe.war to the Tomcat webapps directory. cp ~/webscribe.war /var/lib/tomcat/webapps/
  2. Browse to your server's address with webscribe/ appended to the URL (e.g. http://localhost:8080/webscribe/) and upload a short recording.
    This will start the WhisperX installation, download the default model, and create the configuration file, which you can edit to change your settings. This can take a few minutes to complete.

The transcriber's configuration is loaded from .../webscribe/transcriber/WhisperXTranscriber/WhisperXTranscriber.cfg

The configuration is text encoded as a URL, e.g.

minShortPauseLength=0.35&minMediumPauseLength=0.7&minLongPauseLength=1.4&shortPauseLabel=%28.%29&mediumPauseLabel=%28..%29&longPauseLabel=%28...%29&maxUtteranceDuration=15.0&utterancePadding=0.5

To change the configuration, you can change the values of parameters in the string, or add new parameters separated by &. Possible parameters include:

language : Sets the expected language of the audio (it is otherwise inferred from the recording) e.g. language=en for speech in English.

diarize : Enables diarization if set to true - i.e. diarize=true. In order for diarization to work, you also need to set huggingFaceToken.

huggingFaceToken : Your huggingface.co authentication token, which is required for downloading diarization models - e.g. huggingFaceToken=hf_XXXXXXXXXXXXXXXXXXXXX. See https://huggingface.co/docs/hub/security-tokens for information about how to generate a token.

minSpeakers : Minimum number of speakers for diarization, e.g. minSpeakers=2

maxSpeakers : Maximum number of speakers for diarization, e.g. maxSpeakers=5

model : Model to use for STT - can be the name of a Whisper model (e.g. model=large-v3), or the directory containing a custom model (e.g. model=/opt/whisper/my-adapted-model or model=my-adapted-model if the model directory is in .../webscribe/transcriber/WhisperXTranscriber/). The default model is medium)

chunkSize : The length (in seconds) of audio processed at once. 30 seconds is a balanced default for processing time vs. accuracy. Smaller chunks can yield more precise boundaries, while larger chunks can speed up processing. e.g. chunkSize=15

How to use

  1. Click the Browse button and select a .wav file to transcribe.
  2. Select the transcript format you want.
  3. Wait patiently while the file uploads to the server (there's a progress bar that indicates how much is uploaded so far).
  4. Wait patiently while the recording is transcribed (there's a second progress bar that may indicate progress, although generally this stays at 0% for a long time and then is suddenly at 100%). The first time you upload a recording, there is an initial delay while Whisper downloads its models for STT. This is a one-time process, and subsequent recordings don't require this initial delay.
  5. Save the resulting transcript.

About

Simple web service for audio transcription

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors