Skip to content

catcto/SenseVoiceDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SenseVoiceDocker

This repository provides a Docker image for SenseVoice, enabling you to deploy the SenseVoice ASR service within a Docker container.

Usage

To run this Docker container, you’ll need a machine with NVIDIA GPU support and the NVIDIA Container Toolkit installed. For detailed installation steps, please refer to the NVIDIA Container Toolkit guide.

Build the Docker image

$ docker build -t sensevoice .

Using docker command

$ docker run -d --name sensevoice_server -p 8080:8080 \
         --runtime=nvidia \
         -e NVIDIA_DRIVER_CAPABILITIES=all \
         -e NVIDIA_VISIBLE_DEVICES=all \
         sensevoice

Using docker compose

  1. Create a docker-compose.yml file:
services:
  sensevoice_server:
    image: sensevoice
    container_name: sensevoice_server
    ports:
      - "8080:8080"
    restart: always
    runtime: nvidia
    environment:
      NVIDIA_DRIVER_CAPABILITIES: all
      NVIDIA_VISIBLE_DEVICES: all
  1. Start the container:
$ docker compose up -d

Testing

To test the API, use curl:

# download url audio file example
curl -X 'POST' \
  'http://127.0.0.1:8080/api/v1/asr' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'url=https://iic-sensevoice.ms.show/file=/tmp/gradio/1f7cfa14376cc0bb5f6071a7b0d7bea610842119/zh.mp3'

# upload audio file example
curl -X 'POST' \
  'http://127.0.0.1:8080/api/v1/asr' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@vad_example.wav' \
  -F 'language=auto'

About

This repository provides a Docker image for SenseVoice

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published