emitblabbertabber

package
v0.0.0-...-b1d8076 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

emitblabbertabber massages the output from the IBM Speech to Text back-end into a format that can be readily output for easy consumption by the front-end javascript.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SquashSpeakerLabels

func SquashSpeakerLabels(speakerLabels []parseibm.SpeakerLabel) ([]parseibm.SpeakerLabel, error)

Types

type SpeakerStat

type SpeakerStat struct {
	Speaker   string  `json:"speaker"`
	TotalTime float64 `json:"total_time"`
}

type SpeakerStats

type SpeakerStats []SpeakerStat

func (SpeakerStats) Len

func (s SpeakerStats) Len() int

func (SpeakerStats) Less

func (s SpeakerStats) Less(i, j int) bool

func (SpeakerStats) Swap

func (s SpeakerStats) Swap(i, j int)

type Summary

type Summary struct {
	TotalSpeakingTime float64       `json:"total_speaking_time"`
	LeaderBoard       []SpeakerStat `json:"leader_board"`
	Utterances        []Utterance   `json:"utterances"`
}

func CalcSummary

func CalcSummary(utterances []Utterance) (summary Summary, err error)

type Utterance

type Utterance struct {
	Speaker    int     `json:"speaker"`
	From       float64 `json:"from"`
	To         float64 `json:"to"`
	Transcript string  `json:"transcript"`
}

func Coerce

func Coerce(transaction parseibm.IBMTranscription) (utterances []Utterance, err error)

Jump to

Keyboard shortcuts

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