julius/record.c
認識した入力音声をファイルに保存する.
[詳細]
#include <julius.h>
#include <time.h>
ソースコードを見る。
説明
認識した入力音声をファイルに保存する.
- 作者:
- Akinobu Lee
- 日付:
- Tue Sep 06 14:13:54 2005
入力された音声データを1つずつファイルに保存する. ファイル名は録音時のタイムスタンプから "YYYY.MMDD.HHMMSS.wav" となる. ファイル形式は Microsoft WAVE format, 16bit, PCM (無圧縮) である.
録音はいったんメモリに確保されずに、入力と平行してファイルに直接 書き込まれる。最初は一時ファイルに記録され、録音終了後(=第1パス 終了後)に上記の形式のファイル名に変更される。
- Revision
- 1.4
record.c で定義されています。
関数
static void timestring |
( |
char * |
t, |
|
|
int |
maxlen | |
|
) |
| | [static] |
static void make_record_filename |
( |
char * |
buf, |
|
|
int |
buflen, |
|
|
char * |
filename | |
|
) |
| | [static] |
ベースファイル名から実際のパス名を作成する.ディレクトリは大域変数 record_dirname であらかじめ指定されている.
- 引数:
-
| buf | [out] 結果のパス名を格納するバッファへのポインタ |
| buflen | [in] buf の最大長 |
| filename | [in] ベースファイル名 |
record.c の 97 行で定義されています。
参照元 record_sample_close().
static void make_tmp_filename |
( |
char * |
buf, |
|
|
int |
buflen | |
|
) |
| | [static] |
void record_sample_open |
( |
|
) |
|
void record_sample_write |
( |
SP16 * |
speech, |
|
|
int |
samplenum | |
|
) |
| | |
void record_sample_close |
( |
|
) |
|