#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sent/tcpip.h>
Go to the source code of this file.
Functions | |
boolean | adin_tcpip_standby (int freq, void *port_str) |
Initialize as adinnet server: prepare to become server. | |
boolean | adin_tcpip_begin () |
Wait for connection from adinnet client and begin audio input stream. | |
boolean | adin_tcpip_end () |
End recording. | |
int | adin_tcpip_read (SP16 *buf, int sampnum) |
Try to read sampnum samples and returns actual sample num recorded. | |
boolean | adin_tcpip_send_pause () |
Tell the adinnet client to pause transfer. | |
boolean | adin_tcpip_send_resume () |
Tell the adinnet client to resume the paused transfer. | |
boolean | adin_tcpip_send_terminate () |
Tell the adinnet client to terminate transfer. | |
Variables | |
static int | adinnet_sd = -1 |
Listen socket for adinserv. | |
static int | adinnet_asd = -1 |
Accept socket for adinserv. |
Low level I/O functions for audio input from adinnet client. The adinnet server/client is a scheme to transfer speech data via tcp/ip network with segmentation information, implemented for Julius. When this input is selected, Julius becomes adinnet server and wait for a client to connect. The sample client "adintool" is also included in Julius package.
This input works on Linux, Windows and most OS where Julius can run.
"EsounD" is an another method of obtaining audio input from network on Linux. See adin_esd.c for details.
Definition in file adin_tcpip.c.
boolean adin_tcpip_standby | ( | int | freq, | |
void * | port_str | |||
) |
Initialize as adinnet server: prepare to become server.
freq | [in] required sampling frequency | |
port_str | [in] port number in string |
Definition at line 78 of file adin_tcpip.c.
Referenced by adin_select().
boolean adin_tcpip_begin | ( | ) |
Wait for connection from adinnet client and begin audio input stream.
Definition at line 100 of file adin_tcpip.c.
Referenced by adin_select().
boolean adin_tcpip_end | ( | ) |
End recording.
If last input segment was segmented by end of connection, close socket and wait for next connection. Otherwise, it means that the last input segment was segmented by either end-of-segment signal from client side or speech detection function in server side, so just wait for a next input in the current socket.
Definition at line 149 of file adin_tcpip.c.
Referenced by adin_select().
int adin_tcpip_read | ( | SP16 * | buf, | |
int | sampnum | |||
) |
Try to read sampnum samples and returns actual sample num recorded.
This function will not block.
If data of zero length has been received, it is treated as a end-of-segment marker from the client. If data below zero length has been received, it means the client has finished the overall input stream transmission and want to disconnect.
buf | [out] samples obtained in this function | |
sampnum | [in] wanted number of samples to be read |
Definition at line 180 of file adin_tcpip.c.
Referenced by adin_select().
boolean adin_tcpip_send_pause | ( | ) |
Tell the adinnet client to pause transfer.
Definition at line 224 of file adin_tcpip.c.
Referenced by adin_select().
boolean adin_tcpip_send_resume | ( | ) |
Tell the adinnet client to resume the paused transfer.
Definition at line 242 of file adin_tcpip.c.
Referenced by adin_select().
boolean adin_tcpip_send_terminate | ( | ) |
Tell the adinnet client to terminate transfer.
Definition at line 290 of file adin_tcpip.c.
Referenced by adin_select().