whisper-service

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 15 Imported by: 0

README

Whisper Service

test status Go Report Card MIT license Go version latest tag feline reference

gRPC service for a self-hosted openai/whisper.

Running with Docker

To get and run the service from Docker Hub:

docker pull ashesss/openai-whisper-service:latest
docker run -p 8080:8080 ashesss/openai-whisper-service:latest
GPU

To utilize the GPU for the service, first make sure that nvidia plugin for docker is installed then start ther container with GPU support:

docker run -p 8080:8080 --gpus all ashesss/openai-whisper-service:latest
Model Cache

ASR models will be downloaded for each new container, if you want to cache them on persistent volume, mount it as follows:

docker run -p 8080:8080 -v /path/to/cached/models:/root/.cache/whisper ashesss/openai-whisper-service:latest

Basic Usage

With Go you can simply import client from this repo:

import whisperpb "github.com/d-ashesss/whisper-service/proto"

func main() {
	conn, _ := grpc.Dial("localhost:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))
	c := whisperpb.NewWhisperServiceClient(conn)
	stream, err := c.Transcribe(context.Background())
	...
}

For other languages use whisper.proto file to generate gRPC client.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL