opusenc

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 11 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 opusenc converts audio, such as speech, to voice notes, which are Ogg Opus, with opusenc, of opus-tools, which it runs, such as for the llm tools' voice notes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter converts audio to voice notes, with opusenc

func New

func New(path string) (*Converter, error)

New returns the converter which runs opusenc, of opus-tools, at the path, or the one on the PATH, when it's empty. Returns ErrNotFound when there's none.

func (*Converter) Convert

func (c *Converter) Convert(ctx context.Context, audio gollm.Resource) (gollm.Resource, error)

Convert returns the audio as a voice note, which is Ogg Opus, for speech, from WAV, AIFF, FLAC, or raw PCM, as audio/L16, with its rate, and channels, or ErrNotImplemented when it's audio of another type

func (*Converter) Path

func (c *Converter) Path() string

Path returns the path of opusenc

Jump to

Keyboard shortcuts

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