speech_to_text

package
v0.0.0-...-eb4b608 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiUrl       = "https://api.openai.com/v1/audio/transcriptions"
	MaxVoiceSize = 25000000 // "File uploads are currently limited to 25 MB"
	MaxDuration  = 180      // 3 minutes
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiErrorResponse

type ApiErrorResponse struct {
	Error struct {
		Message string `json:"message"`
		Type    string `json:"type"`
	} `json:"error"`
}

type ApiResponse

type ApiResponse struct {
	Text string `json:"text"`
}

type Plugin

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

func New

func New(credentialService model.CredentialService) *Plugin

func (*Plugin) Commands

func (p *Plugin) Commands() []telebot.Command

func (*Plugin) Handlers

func (p *Plugin) Handlers(*telebot.User) []plugin.Handler

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) OnVoice

func (p *Plugin) OnVoice(c plugin.GobotContext) error

Jump to

Keyboard shortcuts

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