voicebase-0.1.1.4: Upload audio files to voicebase to get a transcription

Safe HaskellNone
LanguageHaskell2010

VoicebaseClient

Description

Main module for doing the requests to the voicebase api: http://voicebase.readthedocs.io/en/v2-beta/

Synopsis

Documentation

transcribe :: BearerToken -> Options -> [Part] -> IO (Either Error Value) Source #

Generic transcribe, agnostic of options, will add ssl, | the bearer token and a timeout to the options. | Throws HttpExceptionRequest

transcribeFile :: Configuration -> BearerToken -> FilePath -> IO (Either Error Value) Source #

Given a bearer token, and a filepath to an audio file, this function will | eventually return a transcript or times out after 10 seconds | Throws HttpExceptionRequest, IOException (file not found)

transcribeBytes :: Configuration -> BearerToken -> LazyByteFile -> IO (Either Error Value) Source #

Transcribe a bytestring | Throws HttpExceptionRequest

transcribeParse :: Configuration -> BearerToken -> FilePath -> IO (Either Error Transcript) Source #

transcribes the audio file and puts it into a Transcript

data Error Source #

Instances
Show Error Source # 
Instance details

Defined in VoicebaseClient

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

data LazyByteFile Source #

In case of a bytestring, we also need to mimetype to decode the send string

Constructors

LazyByteFile 

data Configuration Source #

Instances
Generic Configuration Source # 
Instance details

Defined in VoicebaseClient

Associated Types

type Rep Configuration :: * -> * #

ToJSON Configuration Source # 
Instance details

Defined in VoicebaseClient

type Rep Configuration Source # 
Instance details

Defined in VoicebaseClient

type Rep Configuration = D1 (MetaData "Configuration" "VoicebaseClient" "voicebase-0.1.1.4-Lddxg5ZBF8j6xdnz2cdbBg" False) (C1 (MetaCons "Configuration" PrefixI True) (S1 (MetaSel (Just "channels") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Channels)) :*: S1 (MetaSel (Just "language") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Language)))

data Channels Source #

Constructors

Channels 

Fields

Instances
Generic Channels Source # 
Instance details

Defined in VoicebaseClient

Associated Types

type Rep Channels :: * -> * #

Methods

from :: Channels -> Rep Channels x #

to :: Rep Channels x -> Channels #

ToJSON Channels Source # 
Instance details

Defined in VoicebaseClient

type Rep Channels Source # 
Instance details

Defined in VoicebaseClient

type Rep Channels = D1 (MetaData "Channels" "VoicebaseClient" "voicebase-0.1.1.4-Lddxg5ZBF8j6xdnz2cdbBg" False) (C1 (MetaCons "Channels" PrefixI True) (S1 (MetaSel (Just "left") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Speaker) :*: S1 (MetaSel (Just "right") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Speaker)))

data Speaker Source #

Constructors

Speaker 

Fields

Instances
Generic Speaker Source # 
Instance details

Defined in VoicebaseClient

Associated Types

type Rep Speaker :: * -> * #

Methods

from :: Speaker -> Rep Speaker x #

to :: Rep Speaker x -> Speaker #

ToJSON Speaker Source # 
Instance details

Defined in VoicebaseClient

type Rep Speaker Source # 
Instance details

Defined in VoicebaseClient

type Rep Speaker = D1 (MetaData "Speaker" "VoicebaseClient" "voicebase-0.1.1.4-Lddxg5ZBF8j6xdnz2cdbBg" False) (C1 (MetaCons "Speaker" PrefixI True) (S1 (MetaSel (Just "speaker") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))