clarinsi / Slovene_ASR_e2e

Automatic Speech Recognition tool
Apache License 2.0
16 stars 2 forks source link
speech-recognition speech-to-text

ASR API

Implements the ASR API for NeMo Conformer CTC BPE E2E models. For more details about building such models, see the official NVIDIA NeMo documentation and NVIDIA NeMo GitHub.

The API provides two endpoints /api/healthcheck, to retrieve the service status, and /api/transcribe to request a transcription of an audio file. The only accepted format is WAV 16kHz, 16bit PCM, mono. The maximal accepted audio duration is 300s. Note that transcription of one 300s audio file on cpu will take advantage of all available cores, consume up to 16GB RAM and may take ~180s (on a system with 24 vCPU).

Prerequisites

Model.info

The expected format for model.info is:

language_code: # dash saparated two-letter ISO 639-1 Langauge Code, lowercase, and ISO 3166 Country Code, uppercase, eg. sl-SI
domain: # model domain
version: # model version
info:
  build: # build time in YYYYMMDD-HHSS format
  am:
    framework: nemo:conformer:ctc:bpe
    ... # aditional info, optional
features: # optional
  ... # information about special features
  remap:
  ... # list of {src text}: {tgt text} remappings to be applied prior to returning the end result

The NeMo model file is expected in the same folder, named as conformer_ctc_bpe.nemo.

The Conformer CTC BPE E2E Automated Speech Recognition model developed as part of work package 2 of the Development of Slovene in a Digital Environment, RSDO, project (https://slovenscina.eu/govorne-tehnologije), can be downloaded from http://hdl.handle.net/11356/1737.

Deployment

Run docker compose up -d to deploy on cpu or docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d to run on gpu.

Approximate memory consumption for cpu deployment