Classes | Defines | Enumerations | Functions
AtrasrClient.h File Reference
#include <QTcpSocket>
Include dependency graph for AtrasrClient.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ATRASR_CLIENT

Defines

#define ATRASR_FRAME_DATA_SIZE   320 /* 160 * 2 ( 10ms of 16kHz 16bit sampling ) */
#define ATRASR_FRAME_HEADER_SIZE   4
#define ATRASR_FRAME_SIZE   (ATRASR_FRAME_HEADER_SIZE + ATRASR_FRAME_DATA_SIZE)
#define ATRASR_RECV_BUF_FRAME_COUNT   100
#define ATRASR_RECV_BUF_SIZE   (ATRASR_FRAME_SIZE * ATRASR_RECV_BUF_FRAME_COUNT)
#define ATRASR_SEND_BUF_FRAME_COUNT   100
#define ATRASR_SEND_BUF_SIZE   (ATRASR_FRAME_SIZE * ATRASR_SEND_BUF_FRAME_COUNT)

Enumerations

enum  ATRASR_FRAME_TYPE {
  ATRASR_TOF = 9, ATRASR_START = 1, ATRASR_DATA = 0, ATRASR_END = 2,
  ATRASR_CANCEL = 6, ATRASR_EOF = 10
}

Functions

void AtrasrClose (ATRASR_CLIENT *client)
int AtrasrConnect (ATRASR_CLIENT *client, const char *srvHost, int srvPort)
unsigned char * AtrasrParseFrame (ATRASR_CLIENT *client, int nIndex, long *type)
int AtrasrReceiveFrame (ATRASR_CLIENT *client)
int AtrasrSendCANCELPU (ATRASR_CLIENT *client)
int AtrasrSendDATA (ATRASR_CLIENT *client, const char *data, size_t size)
void AtrasrSendDataFromFile (ATRASR_CLIENT *client, const char *fileName)
int AtrasrSendENDPU (ATRASR_CLIENT *client)
int AtrasrSendEOF (ATRASR_CLIENT *client)
void AtrasrSendRawData (ATRASR_CLIENT *client, const char *data, size_t size)
int AtrasrSendSTARTPU (ATRASR_CLIENT *client)
int AtrasrSendTOF (ATRASR_CLIENT *client)

Define Documentation

#define ATRASR_FRAME_DATA_SIZE   320 /* 160 * 2 ( 10ms of 16kHz 16bit sampling ) */

Definition at line 9 of file AtrasrClient.h.

#define ATRASR_FRAME_HEADER_SIZE   4

Definition at line 8 of file AtrasrClient.h.

Definition at line 10 of file AtrasrClient.h.

#define ATRASR_RECV_BUF_FRAME_COUNT   100

Definition at line 15 of file AtrasrClient.h.

Definition at line 16 of file AtrasrClient.h.

#define ATRASR_SEND_BUF_FRAME_COUNT   100

Definition at line 12 of file AtrasrClient.h.

Definition at line 13 of file AtrasrClient.h.


Enumeration Type Documentation

Frame type.

Enumerator:
ATRASR_TOF 
ATRASR_START 
ATRASR_DATA 
ATRASR_END 
ATRASR_CANCEL 
ATRASR_EOF 

Definition at line 21 of file AtrasrClient.h.


Function Documentation

void AtrasrClose ( ATRASR_CLIENT client)

Disconnect to ATRASR.

Parameters:
clientthe client object.

Definition at line 50 of file AtrasrClient.cpp.

int AtrasrConnect ( ATRASR_CLIENT client,
const char *  srvHost,
int  srvPort 
)

Connect to ATRASR.

Returns:
0 to success.
Parameters:
clientthe client object.
srvHosthost name.
srvPortport number.

Definition at line 29 of file AtrasrClient.cpp.

unsigned char* AtrasrParseFrame ( ATRASR_CLIENT client,
int  nIndex,
long *  type 
)

Parse received frames.

Returns:
the pointer to sound data.
Parameters:
clientthe client object.
nIndexthe index of the received frames.
type[out] Frame type.

Definition at line 243 of file AtrasrClient.cpp.

int AtrasrReceiveFrame ( ATRASR_CLIENT client)

Receive frames.

Returns:
received frame count.
Parameters:
clientthe client object.

Definition at line 209 of file AtrasrClient.cpp.

int AtrasrSendCANCELPU ( ATRASR_CLIENT client)

Send CANCELPU (cancel of speech).

Returns:
0 to success.
Parameters:
clientthe client object.

Definition at line 203 of file AtrasrClient.cpp.

int AtrasrSendDATA ( ATRASR_CLIENT client,
const char *  data,
size_t  size 
)

Send sound data.

Returns:
0 to success.
Parameters:
clientthe client object.
datasound data buffer.
sizelength of the data.

Definition at line 162 of file AtrasrClient.cpp.

void AtrasrSendDataFromFile ( ATRASR_CLIENT client,
const char *  fileName 
)

Send a file(raw or wav) to ATRASR.

Parameters:
clientthe client object.
fileNamename of file.
int AtrasrSendENDPU ( ATRASR_CLIENT client)

Send ENDPU (end of speech).

Returns:
0 to success.
Parameters:
clientthe client object.

Definition at line 197 of file AtrasrClient.cpp.

int AtrasrSendEOF ( ATRASR_CLIENT client)

Send EOF(End of file).

Returns:
0 to success.
Parameters:
clientthe client object.

Definition at line 96 of file AtrasrClient.cpp.

void AtrasrSendRawData ( ATRASR_CLIENT client,
const char *  data,
size_t  size 
)

Send a raw data( 16kHz, LittleEndian ) to ATRASR.

Parameters:
clientthe client object.
datasound data buffer.
sizelength of the data.
int AtrasrSendSTARTPU ( ATRASR_CLIENT client)

Send STARTPU (start of speech).

Returns:
0 to success.
Parameters:
clientthe client object.

Definition at line 189 of file AtrasrClient.cpp.

int AtrasrSendTOF ( ATRASR_CLIENT client)

Send TOF(Top of file).

Returns:
0 to success.
Parameters:
clientthe client object.

Definition at line 85 of file AtrasrClient.cpp.



rospeex_audiomonitor
Author(s): Komei Sugiura
autogenerated on Thu Jun 6 2019 18:53:06