@hackage voicebase0.1.1.1

Upload audio files to voicebase to get a transcription

Haskell bindings for voice base api

http://voicebase.readthedocs.io/en/v2-beta/

Usage

    import VoicebaseClient
    import Json.TranscriptTypes

    main = do
      result <- transcribeFile "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

The source repo can be found here: https://bitbucket.org/daisee/voicebase

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.