utils

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Copyright © 2022 AssemblyAI support@assemblyai.com

Copyright © 2022 AssemblyAI support@assemblyai.com

Index

Constants

This section is empty.

Variables

View Source
var AAIURL = "https://api.assemblyai.com/v2"
View Source
var ConfigFileName = "config.toml"
View Source
var ConfigFolderPath = ".config/assemblyai"
View Source
var DistinctId string
View Source
var Filename = os.TempDir() + "tmp-video."
View Source
var INVALID_TOKEN = "" /* 136-byte string literal not displayed */
View Source
var PH_TOKEN string
View Source
var SENTRY_DNS string
View Source
var Token string

Functions

func BeutifyJSON

func BeutifyJSON(data []byte) []byte

func CallSpinner

func CallSpinner(message string) *spinner.Spinner

func CheckForUpdates added in v1.12.1

func CheckForUpdates(currentVersion string)

func CheckIfTokenValid

func CheckIfTokenValid() bool

func ConfigFolderExist

func ConfigFolderExist() bool

func Contains added in v1.14.1

func Contains(s []string, e string) bool

func CreateConfigFile

func CreateConfigFile()

func GetConfigFileValue

func GetConfigFileValue(key string) string

func GetEnvWithKey added in v1.14.1

func GetEnvWithKey(key string) *string

func GetExtension added in v1.16.1

func GetExtension(fileType string) string

func GetSentenceTimestamps

func GetSentenceTimestamps(sentences []string, words []S.SentimentAnalysisResult) []string

func GetSentenceTimestampsAndSpeaker

func GetSentenceTimestampsAndSpeaker(sentences []string, words []S.SentimentAnalysisResult) [][]string

func GetSrtText added in v1.17.1

func GetSrtText(words []S.SentimentAnalysisResult) string

func GetStoredToken

func GetStoredToken() string

func InitSentry

func InitSentry()

func IsValidFileType added in v1.16.1

func IsValidFileType(fileType string) bool

func PollTranscription

func PollTranscription(id string, flags S.TranscribeFlags)

func PrintError

func PrintError(props S.PrintErrorProps)

func QueryApi

func QueryApi(path string, method string, body io.Reader, s *spinner.Spinner) []byte

func SetConfigFileValue

func SetConfigFileValue(key string, value string)

func SetUserAlias

func SetUserAlias()

func SplitSentences

func SplitSentences(wholeText string, isLineBreeakEnabled bool) []string

func TelemetryCaptureEvent

func TelemetryCaptureEvent(event string, properties *S.PostHogProperties)

func Transcribe

func Transcribe(params S.TranscribeParams, flags S.TranscribeFlags)

func TransformMsToTimestamp

func TransformMsToTimestamp(n int64, showMs bool) string

func UploadFile

func UploadFile(path string) string

func ValidateCustomSpelling added in v1.12.1

func ValidateCustomSpelling(customSpelling []S.CustomSpelling) error

func YoutubeDownload

func YoutubeDownload(id string) string

Types

type ArrayCategories

type ArrayCategories struct {
	Score    float64 `json:"score"`
	Category string  `json:"category"`
}

Jump to

Keyboard shortcuts

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