メインページ | モジュール | データ構造 | Directories | ファイル一覧 | データフィールド | グローバル | 関連ページ

record.c

認識した入力音声をファイルに保存する.. [詳細]

#include <julius.h>
#include <time.h>

record.cのインクルード依存関係図

ソースコードを見る。

マクロ定義

#define TSTRLEN   18
 String length of a time format.

関数

static void timestring (char *t, int maxlen)
static void make_record_filename (char *buf, int buflen, char *filename)
static void make_tmp_filename (char *buf, int buflen)
void record_sample_open ()
void record_sample_write (SP16 *speech, int samplenum)
void record_sample_close ()

変数

static char tstr [TSTRLEN]
 Work area to hold time string.
static char recfilename [MAXLINELEN]
 Temporary file name for storing the incoming data.
static char finalfilename [MAXLINELEN]
 After recording is done, the file will be renames to this.
static FILE * fp = NULL
 File pointer of current file.
static int totalnum
 Current number of recorded samples.


説明

認識した入力音声をファイルに保存する..

作者:
Akinobu Lee
日付:
Tue Sep 06 14:13:54 2005
入力された音声データを1つずつファイルに保存する. ファイル名は録音時のタイムスタンプから "YYYY.MMDD.HHMMSS.wav" となる. ファイル形式は Microsoft WAVE format, 16bit, PCM (無圧縮) である.

録音はいったんメモリに確保されずに、入力と平行してファイルに直接 書き込まれる。最初は一時ファイルに記録され、録音終了後(=第1パス 終了後)に上記の形式のファイル名に変更される。

Revision
1.1.1.1

record.c で定義されています。


関数

static void timestring char *  t,
int  maxlen
[static]
 

システム時間からベースファイル名を作成する.

引数:
t [out] 結果を格納する文字列バッファ
maxlen [in] t の最大長

record.c67 行で定義されています。

参照元 record_sample_write().

static void make_record_filename char *  buf,
int  buflen,
char *  filename
[static]
 

ベースファイル名から実際のパス名を作成する.ディレクトリは大域変数 record_dirname であらかじめ指定されている.

引数:
buf [out] 結果のパス名を格納するバッファへのポインタ
buflen [in] buf の最大長
filename [in] ベースファイル名

record.c97 行で定義されています。

参照元 record_sample_close().

static void make_tmp_filename char *  buf,
int  buflen
[static]
 

一時ファイル名を作成する.

引数:
buf [out] 結果のファイル名を格納するポインタ
buflen [in] buf の最大長

record.c126 行で定義されています。

参照元 record_sample_open().

void record_sample_open  ) 
 

録音のために一時ファイルをオープンする.

record.c146 行で定義されています。

参照元 main_recognition_loop(), と RealTimePipeLinePrepare().

void record_sample_write SP16 speech,
int  samplenum
 

入力音声断片をファイルに追加記録する.

引数:
speech [in] 音声データのバッファ
samplenum [in] 音声データの長さ(サンプル数)

record.c175 行で定義されています。

参照元 adin_cut_callback_store_buffer(), と RealTimePipeLine().

void record_sample_close  ) 
 

録音を終了する.録音用の一時ファイルをクローズし、本来の名前にrenameする。

record.c207 行で定義されています。

参照元 main_recognition_loop().


Juliusに対してTue Mar 28 16:05:06 2006に生成されました。  doxygen 1.4.2