voicetest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package voicetest replays a voice gateway text session recorded from the real gateway.

testdata/text_session.json holds the recording. voicegateway/voicertc's TestServeTextSessionTrace drives the production text session with its client messages and fails when the gateway replies differ. Regenerate it with:

go test ./voicegateway/voicertc -run TestServeTextSessionTrace -update

The web voice tests replay the file, and the Android voice fixture serves its gateway replies, so client tests cannot assume messages the gateway does not send.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatewayReplies

func GatewayReplies(kind voicev2.MessageKind) []json.RawMessage

GatewayReplies returns the gateway messages recorded after the first client message of kind, up to the next client message. It returns nil when no client message has that kind.

Types

type Sender

type Sender string

Sender identifies which side of a text session sent a recorded message.

const (
	// Client marks a message the client sends to the gateway.
	Client Sender = "client"
	// Gateway marks a message the gateway sends to the client.
	Gateway Sender = "gateway"
)

type Step

type Step struct {
	// From is the side that sent Message.
	From Sender `json:"from"`
	// Message is the protocol message as sent on the WebSocket.
	Message json.RawMessage `json:"message"`
	// Kind is Message's kind; TextSession sets it.
	Kind voicev2.MessageKind `json:"-"`
}

Step is one recorded text-session message.

func TextSession

func TextSession() []Step

TextSession returns the recorded text session in wire order.

Jump to

Keyboard shortcuts

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