Deploying AI4Bharat Indic Conformer ASR model as a serverless endpoint on runpod
1.4K
The models used in this project come from AI4Bharat's Indic Conformer project.
Before running the project, you need to build a Docker image that includes the necessary dependencies and the pre-downloaded model.
Ensure you have Docker installed on your system.
Build the Docker image:
docker image build -f Dockerfile -t adimyth/serverless-s2t-indic-conformer:v1.0.0 .
This command builds the Docker image with the tag adimyth/serverless-s2t-indic-conformer:v1.0.0
python3 -m venv .venv
source .venv/bin/activate
pip install -r builder/requirements.txt
git clone https://github.com/AI4Bharat/NeMo.git -b nemo-v2
pip install packaging huggingface_hub==0.23.2
cd NeMo && bash reinstall.sh
cd ..
sudo mkdir -p /temp/models/asr
sudo chmod -R 777 /temp/models/asr
wget https://objectstore.e2enetworks.net/indic-asr-public/indicConformer/ai4b_indicConformer_hi.nemo -O /temp/models/asr/hi.nemo
Modify the
src/handler.pyfile to remove the other languages from the list & update the model prefix path to/temp/models/asr/instead
python3 src/handler.py --rp_serve_api --rp_api_host 0.0.0.0 --rp_log_level DEBUG
curl --location 'http://0.0.0.0:8000/runsync' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"audioURL": "https://www.tuttlepublishing.com/content/docs/9780804844383/06-18%20Part2%20Car%20Trouble.mp3", "language": "hi"}'
Content type
Image
Digest
sha256:c0c37d587…
Size
14.9 GB
Last updated
almost 2 years ago
docker pull adimyth/serverless-s2t-indic-conformer:v1.2.0