#include <QTcpSocket>
Go to the source code of this file.
#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.
enum ATRASR_FRAME_TYPE |
Frame type.
Definition at line 21 of file AtrasrClient.h.
void AtrasrClose | ( | ATRASR_CLIENT * | client | ) |
Disconnect to ATRASR.
client | the client object. |
Definition at line 50 of file AtrasrClient.cpp.
int AtrasrConnect | ( | ATRASR_CLIENT * | client, |
const char * | srvHost, | ||
int | srvPort | ||
) |
Connect to ATRASR.
client | the client object. |
srvHost | host name. |
srvPort | port number. |
Definition at line 29 of file AtrasrClient.cpp.
unsigned char* AtrasrParseFrame | ( | ATRASR_CLIENT * | client, |
int | nIndex, | ||
long * | type | ||
) |
Parse received frames.
client | the client object. |
nIndex | the index of the received frames. |
type | [out] Frame type. |
Definition at line 243 of file AtrasrClient.cpp.
int AtrasrReceiveFrame | ( | ATRASR_CLIENT * | client | ) |
Receive frames.
client | the client object. |
Definition at line 209 of file AtrasrClient.cpp.
int AtrasrSendCANCELPU | ( | ATRASR_CLIENT * | client | ) |
Send CANCELPU (cancel of speech).
client | the client object. |
Definition at line 203 of file AtrasrClient.cpp.
int AtrasrSendDATA | ( | ATRASR_CLIENT * | client, |
const char * | data, | ||
size_t | size | ||
) |
Send sound data.
client | the client object. |
data | sound data buffer. |
size | length 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.
client | the client object. |
fileName | name of file. |
int AtrasrSendENDPU | ( | ATRASR_CLIENT * | client | ) |
Send ENDPU (end of speech).
client | the client object. |
Definition at line 197 of file AtrasrClient.cpp.
int AtrasrSendEOF | ( | ATRASR_CLIENT * | client | ) |
Send EOF(End of file).
client | the 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.
client | the client object. |
data | sound data buffer. |
size | length of the data. |
int AtrasrSendSTARTPU | ( | ATRASR_CLIENT * | client | ) |
Send STARTPU (start of speech).
client | the client object. |
Definition at line 189 of file AtrasrClient.cpp.
int AtrasrSendTOF | ( | ATRASR_CLIENT * | client | ) |
Send TOF(Top of file).
client | the client object. |
Definition at line 85 of file AtrasrClient.cpp.