EQTY LabDocs

Whisper Example

Run a Whisper transcription job on a CRT that reads audio from /input, writes text to /output, and records both in its manifest.

View as Markdown

This job transcribes every audio file in /input into a text file in /output. The manifest it produces records every input and output, so the Lineage Explorer can show exactly which files went in and which came out.

This example builds on the Quick Start. It assumes a deployed CRT and an operator certificate that works with the interface you choose.

Folders

The runtime mounts three folders into every container:

FolderScopeHolds
/inputShared by every jobFiles you upload before starting a job
/outputUnique to each jobWhat the job writes
/proofUnique to each jobThe signed manifest and attestation artifacts

/input is shared because it has to exist before a job starts; /output and /proof are created for each run under its project_id.

Compose file

This compose file uses the OpenAI Whisper container and replaces its entrypoint with a shell loop. $$ escapes $, so Compose passes it to the shell instead of interpolating it.

yml
services:
  whisper:
    image: onerahmet/openai-whisper-asr-webservice:latest
    container_name: whisper_transcriber
    environment:
      - ASR_MODEL=base # or tiny / small / medium etc.
      - ASR_ENGINE=openai_whisper
    entrypoint: ["/bin/sh", "-c"]
    command:
      - >
        for f in /input/*; do
          if [ -f "$$f" ]; then
            echo "Transcribing $$f...";
            whisper --model "$$ASR_MODEL" "$$f" \
              --output_dir /output \
              --output_format txt;
          fi;
        done

Run it

You need an audio file to transcribe. If you don’t have one, use a file from this sample dataset.

  1. In the web console, select Files and upload the audio file under Input files.

  2. Select Launch, paste the compose file above into the editor, and select Start job.

  3. Select Go to Monitor in the Project started dialog, then Logs, and turn on Live to follow progress. The job stops by itself once every file is transcribed.

    Monitor, Logs view, showing Whisper transcribing /input/sample.wav

  4. Select Files, choose Output under Results to download the transcripts, then select Monitor → Manifest and Download to save eqty_manifest.json.

    The Files screen with sample.wav under Input files and sample.txt under Results, Output

These steps use vcomp-crt-api-cli, installed and configured with the command line tools.

  1. Upload the audio file to /input. The command line has no upload command, so call the API with curl and your operator certificate:

    sh
    curl -k --cert operator1.crt --key operator1.key \
      -F "file=@sample.wav" \
      https://{{VM_IP}}:447/files/input

    You can also upload it through the file browser, into its input folder.

  2. Save the compose file above as docker-compose-whisper.yml and start the job. The command returns once the image is pulled and the container has started; the Whisper image is over 2 GB, so the first run takes a few minutes. Make a note of the project_id it prints:

    sh
    vcomp-crt-api-cli start docker-compose-whisper.yml
  3. Follow progress with vcomp-crt-api-cli status log. The job stops by itself once every file is transcribed; vcomp-crt-api-cli status ps then shows an empty table.

  4. List the transcripts and download the manifest:

    sh
    curl -k --cert operator1.crt --key operator1.key \
      https://{{VM_IP}}:447/files/{{PROJECT_ID}}/output
    
    curl -k --cert operator1.crt --key operator1.key \
      -X POST -o eqty_manifest.json \
      https://{{VM_IP}}:447/manifest

Upload the manifest to the Lineage Explorer and use its dataset view to inspect the individual input and output files.

Lineage Explorer showing the Whisper workload manifest with its input and output datasets