Skip to content

This repository provides a Docker image for CosyVoice

License

Notifications You must be signed in to change notification settings

catcto/CosyVoiceDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CosyVoiceDocker

This repository provides a Docker image for CosyVoice, enabling you to deploy the CosyVoice 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 cosyvoice .

Using docker command

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

Using docker compose

  1. Create a docker-compose.yml file:
services:
  cosyvoice_server:
    image: cosyvoice
    container_name: cosyvoice_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:

curl -X POST \
  "http://127.0.0.1:8080/v1/tts" \
  -F "text=你好,欢迎使用语音合成服务" \
  -F "spk=中文女" \
  --output output.wav

About

This repository provides a Docker image for CosyVoice

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published