#include "app.h"
#include <time.h>
Go to the source code of this file.
Functions | |
static void | timestring (char *t, int maxlen) |
Make base filename string from current system time. | |
static void | make_record_filename (char *buf, int buflen, char *basename, char *dirname) |
Make actual file path name from base file name. | |
static void | make_tmp_filename (char *buf, int buflen, char *dirname) |
Make temporary filename to store the incoming data while recording. | |
static void | record_sample_open (Recog *recog, void *dummy) |
Open temporary file for starting recording. | |
static void | record_sample_write (Recog *recog, SP16 *speech, int samplenum, void *dummy) |
Append speech segment to file previously opened by record_sample_open(). | |
static void | record_sample_close (Recog *recog, void *dummy) |
End recording. | |
static boolean | opt_record (Jconf *jconf, char *arg[], int argnum) |
void | record_add_option () |
void | record_setup (Recog *recog, void *data) |
Variables | |
static char * | record_dirname = NULL |
static char | rectmpfilename [MAXLINELEN] |
static char | recordfilename [MAXLINELEN] |
static int | recordlen |
static FILE * | recfile_fp |
These functions record each input data to the corresponding file with file name of their time stamp in a format of "YYYY.MMDD.HHMMSS.wav". The audio format is Microsoft WAVE, 16bit, PCM (no compression).
The recording will not be stored in memory, instead it will be directly recorded to a temporary file on the fly. After an end-of-sentence found and the first pass ends, the temporary file will be moved to the final filename descrived above.
Definition in file record.c.
static void timestring | ( | char * | t, | |
int | maxlen | |||
) | [static] |
Make base filename string from current system time.
t | [out] string buffer to hold the result string. | |
maxlen | [in] the length of t. |
Definition at line 67 of file record.c.
Referenced by record_sample_write().
static void make_record_filename | ( | char * | buf, | |
int | buflen, | |||
char * | basename, | |||
char * | dirname | |||
) | [static] |
Make actual file path name from base file name.
The recording directory should be specified by the global variable "record_dirname".
buf | [out] buffer to hold the result string of this function | |
buflen | [in] maximum length of buf. | |
filename | [in] base filename. |
Definition at line 97 of file record.c.
Referenced by record_sample_write().
static void make_tmp_filename | ( | char * | buf, | |
int | buflen, | |||
char * | dirname | |||
) | [static] |
Make temporary filename to store the incoming data while recording.
buf | [out] pointer of buffer to hold the resulting file name. | |
buflen | [in] maximum length of buf. |
Definition at line 127 of file record.c.
Referenced by record_sample_open().
static void record_sample_write | ( | Recog * | recog, | |
SP16 * | speech, | |||
int | samplenum, | |||
void * | dummy | |||
) | [static] |
Append speech segment to file previously opened by record_sample_open().
speech | [in] speech buffer | |
samplenum | [in] length of above in samples |
static void record_sample_close | ( | Recog * | recog, | |
void * | dummy | |||
) | [static] |