aws-transcribe-ws-0.0.1.0: Websocket streaming to Amazon Transcribe service
Safe HaskellNone
LanguageHaskell2010

AWS.Transcribe

Description

Use the WebSocket protocol to stream audio to the AWS Transcribe service

For general information regarding the service see the relevant AWS documentation (https://docs.aws.amazon.com/transcribe/latest/dg/websocket.html)

Synopsis

Credentials

data Credentials Source #

AWS Security credentials comprising of an access key ID and a secret key. Temporary security tokens are not supported

Instances

Instances details
FromJSON Credentials Source # 
Instance details

Defined in AWS.Credentials

newCredentials Source #

Arguments

:: Text

Access Key

-> Text

Secret Key

-> Credentials 

lookupCredentials Source #

Arguments

:: String

Access Key environment variable

-> String

Secret Key environment variable

-> IO (Maybe Credentials) 

Use the provided environment variables to create Credentials

runClient Source #

Arguments

:: Credentials

AWS Credentials

-> Settings

Session settings

-> Channel

Transcribe channel

-> IO () 

Start a WebSocket client. The client will probe the channel for incoming ByteString, encode it in the expected Event Stream and transmit them to the AWS Transcribe endpoint. When a response is received it will be written in the channel.

Sending an empty ByteString will close the WebSocket connection. Receiving any kind of exception from AWS Transcribe will also close the connection.

Channel

data Channel Source #

An AWS Transcribe channel abstraction. Audio Bytestrings are written to the channel to be transcribed. Transcribed StreamingResponses are read from the channel.

writeChannel :: Channel -> ByteString -> IO () Source #

Write an audio ByteString to the channel

tryReadChannel :: Channel -> IO (Maybe StreamingResponse) Source #

Read a StreamingResponse from the Channel if one is available

isEmpty :: Channel -> IO Bool Source #

Is the reading side of the channel empty?

Settings

data Settings Source #

Transcribe session specific settings

data LanguageCode Source #

The language code for the input audio.

Constructors

EnAU 
EnGB 
EnUS 
EsUS 
FrCA 
FrFR 
DeDE 
JaJP 
KoKR 
PtBR 
ZhCN 
ItIT 

data MediaEncoding Source #

The encoding used for the input audio

Constructors

PCM 
OggOpus 
Flac 

data Region Source #

Amazon Transcribe Streaming regions

StreamingResponse

data StreamingError Source #

 

Constructors

BadRequestException 
InternalFailureException 
LimitExceededException 
UnrecognizedClientException 
TranscriptEventError String

An error in decoding a TranscriptEvent

OtherStreamingError Message String

An unrecognised exception type or a binary decoding error. The original message is returned along with a possible description of the error

data Result Source #

Instances

Instances details
Eq Result Source # 
Instance details

Defined in AWS.Transcribe.StreamingResponse

Methods

(==) :: Result -> Result -> Bool #

(/=) :: Result -> Result -> Bool #

Show Result Source # 
Instance details

Defined in AWS.Transcribe.StreamingResponse

ToJSON Result Source # 
Instance details

Defined in AWS.Transcribe.StreamingResponse

FromJSON Result Source # 
Instance details

Defined in AWS.Transcribe.StreamingResponse

data Item Source #

A word, phrase, or punctuation mark that is transcribed from the input audio. https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_Item.html

Instances

Instances details
Eq Item Source # 
Instance details

Defined in AWS.Transcribe.Item

Methods

(==) :: Item -> Item -> Bool #

(/=) :: Item -> Item -> Bool #

Show Item Source # 
Instance details

Defined in AWS.Transcribe.Item

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

FromJSON Item Source # 
Instance details

Defined in AWS.Transcribe.Item

data ItemType Source #

The type of the Item

Constructors

Pronunciation

Indicates that the Item is a word that was recognized in the input audio

Punctuation

Indicates that the Item was interpreted as a pause in the input audio

Instances

Instances details
Eq ItemType Source # 
Instance details

Defined in AWS.Transcribe.Item

Show ItemType Source # 
Instance details

Defined in AWS.Transcribe.Item

FromJSON ItemType Source # 
Instance details

Defined in AWS.Transcribe.Item