speechtotext

package module
v0.0.0-...-fa71c3a Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSpeechToTextClient

func BuildSpeechToTextClient(googleCredentials GoogleCredentials, context context.Context) *speech.Client

BuildSpeechToTextClient create the speech client from the Google credentials

func ConvertToFlac

func ConvertToFlac(inputFile, fileId string) []byte

ConvertToFlac converts the file to FLAC audio file

func DonwloadsMediaVoice

func DonwloadsMediaVoice(urlFile, fileId string) string

DonwloadsMediaVoice downloads the Voice file from the specified URL

func TranscriptAudio

func TranscriptAudio(speechClient *speech.Client, context context.Context, urlFile, fileId, lang string) []string

TranscriptAudio converts the audio file to text

Types

type GoogleCredentials

type GoogleCredentials struct {
	Type                    string `json:"type"`
	ProjectID               string `json:"project_id"`
	PrivateKeyID            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientID                string `json:"client_id"`
	AuthURI                 string `json:"auth_uri"`
	TokenURI                string `json:"token_uri"`
	AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
	ClientX509CertURL       string `json:"client_x509_cert_url"`
}

Jump to

Keyboard shortcuts

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