whisper-api-server

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 5 Imported by: 0

README

Whisper API Server (Go)

⚠️ This project is a work in progress (WIP).

This API server enables audio transcription using the OpenAI Whisper models.

Setup

  • Download .exe from Releases
  • Just run it!

Build from source

Download the sources and use go build. For example, you can build using the following command:

go build -ldflags "-s -w" -o server.exe main.go

Usage example

Make a request to the server using the following command:

curl http://localhost:3000/v1/audio/transcriptions \
  -H "Content-Type: multipart/form-data" \
  -F file="@/path/to/file/audio.mp3" \

Receive a response in JSON format:

{
  "text": "Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that."
}

Usage with Obsidian

To integrate this with the Obsidian voice recognotion plugin, follow these steps:

  1. Open the plugin's settings.
  2. Set the following values:
    • API KEY: sk-1
    • API URL: http://localhost:3000/v1/audio/transcriptions
    • Model: whisper-1

Roadmap

  • Implement automatic model downloading from huggingface
  • Implement automatic Whisper.dll downloading from Guthub releases
  • Provide prebuilt binaries for Windows
  • Include instructions for running on Linux with Wine (likely possible).
  • Use flags to override the model path
  • Use flags to override the model type (when downloading the model)
  • Use flags to override the port

Credits

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
api
pkg
whisper
github.com/jaybinks/goConstmeWhispers Go Bindings for https://github.com/Const-me/Whisper
github.com/jaybinks/goConstmeWhispers Go Bindings for https://github.com/Const-me/Whisper

Jump to

Keyboard shortcuts

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