go-text-to-wav

command module
v0.0.0-...-6dbff74 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 15 Imported by: 0

README

go-text-to-wav

Super simple text to speech (TTS) converter.

This demo application was created to demonstrate how to use the VoiceDock TTS API.

Installation

Create directories for model data and configuration:

mkdir dataset
mkdir config

Download an example configuration (more information here):

curl -o config/ttspiper.json https://raw.githubusercontent.com/voicedock/ttspiper/main/config/ttspiper.json

Launching a remote "ttspiper" server that converts text to speech and implements the VoiceDock TTS API.

docker run --rm \
  -v "$(pwd)/config:/data/config" \
  -v "$(pwd)/dataset:/data/dataset" \
  -p 9999:9999 \
  ghcr.io/voicedock/ttspiper:latest ttspiper

Clone this repo and run build:

go build

Usage

Show supported language packs on the remote server:

./go-text-to-wav -a 127.0.0.1:9999 -c list
Lang    Speaker Downloaded
ru      Irina   true
en-us   Ryan    false

Start downloading a language pack on a remote server:

./go-text-to-wav -a 127.0.0.1:9999 -c download -l en-us -s Ryan
Staring download (lang: en-us, speaker: Ryan)
Download complete

Run text-to-speech and save the result to a wav file.

echo "Hi, friend! I speak the text in English." | ./go-text-to-wav -a 127.0.0.1:9999 -l en-us -s Ryan > out.wav

or

cat ./text.txt | ./go-text-to-wav -a 127.0.0.1:9999 -l en-us -s Ryan > out.wav

CONTRIBUTING

Lint proto files:

docker run --rm -w "/work" -v "$(pwd):/work" bufbuild/buf:latest lint internal/api/grpc/proto

Generate grpc interface:

docker run --rm -w "/work" -v "$(pwd):/work" ghcr.io/voicedock/protobuilder:1.0.0 generate internal/api/grpc/proto --template internal/api/grpc/proto/buf.gen.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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