Safe Haskell | None |
---|---|
Language | Haskell2010 |
Main module for doing the requests to the voicebase api: http://voicebase.readthedocs.io/en/v2-beta/
Synopsis
- transcribe :: BearerToken -> Options -> [Part] -> IO (Either Error Value)
- transcribeFile :: Configuration -> BearerToken -> FilePath -> IO (Either Error Value)
- transcribeBytes :: Configuration -> BearerToken -> LazyByteFile -> IO (Either Error Value)
- transcribeParse :: Configuration -> BearerToken -> FilePath -> IO (Either Error Transcript)
- type BearerToken = String
- data Error
- data LazyByteFile = LazyByteFile {}
- data Configuration = Configuration {}
- data Channels = Channels {}
- data Speaker = Speaker {}
- data Language
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
type BearerToken = String Source #
get your bearer token at http://voicebase.readthedocs.io/en/v2-beta/how-to-guides/hello-world.html#token
data LazyByteFile Source #
In case of a bytestring, we also need to mimetype to decode the send string
data Configuration Source #
Instances
Generic Configuration Source # | |
Defined in VoicebaseClient type Rep Configuration :: * -> * # from :: Configuration -> Rep Configuration x # to :: Rep Configuration x -> Configuration # | |
ToJSON Configuration Source # | |
Defined in VoicebaseClient toJSON :: Configuration -> Value # toEncoding :: Configuration -> Encoding # toJSONList :: [Configuration] -> Value # toEncodingList :: [Configuration] -> Encoding # | |
type Rep Configuration Source # | |
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))) |
Instances
Generic Channels Source # | |
ToJSON Channels Source # | |
Defined in VoicebaseClient | |
type Rep Channels Source # | |
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))) |