voicebase-0.1.1.0: README.md
# Haskell bindings for voice base api
http://voicebase.readthedocs.io/en/v2-beta/
## Usage
```haskell
import VoicebaseClient
import Json.TranscriptTypes
main = do
result <- transcribe "your bearer token" "./audio.mp3"
-- get validated response or error
case result of
Left err -> print $ err
Right val -> putStrLn val
-- get a parsed structure
parsed <- transcribeParse "your bearer token" "./audio.mp3"
case parsed of
Left err -> print $ err
Right val -> print $ latestTranscriptsWordsTranscripts . transcriptsLatestTranscripts . mediaTranscripts . topLevelMedia val
```
There is also a main file which shows usage
## features
+ Post audio file to voicebase
+ Poll for progress
+ Get resulting transcript or valid json or an error.
## Trivia
### wreq client instead of servant ###
The reason httplib is used rather than servant is because of multipart posting.
It was asserted that servant is incapable of doing that.
This is a requirement for the voicebase api however.
Http client does support this however we need to write more code as a result of this.