app

package
v0.0.0-...-ea22c33 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TokenMap map[string]TokeData

Functions

func InitRecogniseService

func InitRecogniseService()

func TokenGenerator

func TokenGenerator() string

Types

type AudioFileReader

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

type ReadCloserWithCallback

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

func (*ReadCloserWithCallback) Close

func (r *ReadCloserWithCallback) Close() error

func (*ReadCloserWithCallback) Read

func (r *ReadCloserWithCallback) Read(p []byte) (n int, err error)

type RecogniseService

type RecogniseService struct {
	// contains filtered or unexported fields
}
var Recogniser *RecogniseService

func (*RecogniseService) LoadFromURL

func (r *RecogniseService) LoadFromURL(url string, token string, waitConverted *sync.WaitGroup) *SubtitlesRecognitionResultArray

func (*RecogniseService) Recognise

func (r *RecogniseService) Recognise(source io.ReadCloser, contentType string, interrupt *context.CancelFunc) *speechtotextv1.SpeechRecognitionResults

func (*RecogniseService) UploadToRecogniseWithAudioSplitting

func (r *RecogniseService) UploadToRecogniseWithAudioSplitting(file io.ReadCloser, fileExt string, token string, waitConverted *sync.WaitGroup) *SubtitlesRecognitionResultArray

type Subtitles

type Subtitles struct {
	SrtText         string
	Filename        string
	ConvertingError error
}

type SubtitlesChunk

type SubtitlesChunk struct {
	Chunk    string
	Position uint
	Duration float64
}

type SubtitlesRecognitionResultArray

type SubtitlesRecognitionResultArray []SubtitlesChunk

func (*SubtitlesRecognitionResultArray) Len

func (*SubtitlesRecognitionResultArray) Less

func (*SubtitlesRecognitionResultArray) Swap

func (s *SubtitlesRecognitionResultArray) Swap(i, j int)

type TokeData

type TokeData struct {
	Subtitles chan Subtitles
	Cancel    *context.CancelFunc
}

Directories

Path Synopsis
middleware/httprouterwrapper
Package httprouterwrapper allows the use of http.HandlerFunc compatible funcs with julienschmidt/httprouter
Package httprouterwrapper allows the use of http.HandlerFunc compatible funcs with julienschmidt/httprouter
shared

Jump to

Keyboard shortcuts

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