Skip to content

vngcloud/stt-streaming-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example for streaming speech to text

For this example, we'll use the streaming SpeechToText grpc service to transcribe an audio file with VNG Cloud Speech Text AI.

Requirements

  • Golang 1.22 or above
  • A VNG Cloud Account
  • Pakage pkg-config and portaudio

Setup

  1. Enable the Speech-to-Text API
  2. Create a service account with action ai-stt-tts:StreamingSpeechToText permission and download the service account key

Installation

git clone https://github.com/vngcloud/stt-streaming-example.git

The proto file is located at proto/stt.proto. You can generate the gRPC client by running the following command:

cd proto
./generate.sh
cd ../

For build and run the example

#file streaming example
go build -o file ./examples/file/main.go

#mic streaming example
go build -o mic ./examples/mic/main.go

Usage

file streaming example

./file -h 
Usage of ./file:
  -client_id string
        Client ID
  -client_secret string
        Client Secret
  -file string
        File path

Example:

./file -client_id <client_id> -client_secret <client_secret> -file <file_path>

mic streaming example

./mic -h
Usage of ./mic:
  -client_id string
        Client ID
  -client_secret string
        Client Secret

Example:

./mic -client_id <client_id> -client_secret <client_secret>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published