speech

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package speech implements the viam-labs:service:speech API

Index

Constants

This section is empty.

Variables

View Source
var API = resource.APINamespace("viam-labs").WithServiceType("speech")

API is the full API definition.

Functions

func Named

func Named(name string) resource.Name

Named is a helper for getting the named speech's typed resource name.

func NewRPCServiceServer

func NewRPCServiceServer(coll resource.APIResourceCollection[Speech]) interface{}

NewRPCServiceServer returns a new RPC server for the Speech API.

Types

type Speech

type Speech interface {
	resource.Resource
	Say(ctx context.Context, text string, blocking bool) (string, error)
	ToText(ctx context.Context, speech []byte, format string) (string, error)
	ToSpeech(ctx context.Context, text string) ([]byte, error)
	Completion(ctx context.Context, text string, blocking bool) (string, error)
	GetCommands(ctx context.Context, number int) ([]string, error)
	ListenTrigger(ctx context.Context, typ string) (string, error)
	Listen(ctx context.Context) (string, error)
	IsSpeaking(ctx context.Context) (bool, error)
}

Speech defines the Go interface for the component (should match the protobuf methods.)

func FromRobot

func FromRobot(r robot.Robot, name string) (Speech, error)

FromRobot is a helper for getting the named Speech from the given Robot.

func NewClientFromConn

func NewClientFromConn(conn rpc.ClientConn, remoteName string, name resource.Name, logger logging.Logger) Speech

NewClientFromConn creates a new Speech RPC client from an existing connection.

Directories

Path Synopsis
Package speech_api is a reverse proxy.
Package speech_api is a reverse proxy.

Jump to

Keyboard shortcuts

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