## 6.9.1 EstimateTF

### 6.9.1.1 Outline of the node

This node creates the estimated transfer function file using the input signal.

This transfer function is calculated by the following steps.

1. record the input signal from the sound source which generates noise such as white noise.

2. calculate relative transfer function between the microphones for the source position.

Here, localization of the source is estimated by the node for localization such as LocalizeMUSIC . These steps should be execute for the every direction around the microphone array.

### 6.9.1.2 Necessary file

The transfer function file which is used for the base, or the intermediate file group which is consists of microphone position files, source position file, transfer function files for each direction and the intermediate file.

### 6.9.1.3 Usage

When to use

This node creates the estimated transfer function files using the input signal. The estimated transfer function will be used for the localization node and sound source separation node, such as LocalizeMUSIC and GHDSS .

Typical connection

Figure 6.162 shows a typical connection example.

Figure 6.163 shows a typical connection example for the online processing of transfer function. PyCodeExcecutor3 placed in front of EstimateTF receives the localization processing result and outputs the sources and the count number. EstimateTF updates the transfer function using the source and the spectrum data corresponding to target count, and outputs it to the subsequent stage. LocalizeMUSIC updates the transfer function in the node with the transfer function data output from EstimateTF and executes localization. The result of localization is transmitted using PyCodeExcecutor3 via SourceTracker , and received by PyCodeExcecutor3 in the previous stage of EstimateTF . This allows LocalizeMUSIC to always use the latest transfer function data to execute localization.

### 6.9.1.4 Input-output and property of the node

Input

INPUT

: Matrix<complex<float> > , Complex frequency representation of input signals with size $M \times (NFFT/2+1)$.

SOURCE

: Source position (direction) is expressed as Vector<ObjectRef>  type. ObjectRef  is a Source  and is a structure which is consists of the source position.

INPUT_INPROGRESS

: bool , shows the flag for the progressing. When this input becomes false, this node creates the transfer function file.

SEND_DATA

: bool , Flag for data transfer. If 1/true, transfers transfer function data.

RESET

: bool , Flag for data reset. If 1/true, resets and transfers all transfer function data.

SEND_ALL

: bool , Flag for data transfer all. If 1/true, transfers all transfer function data.

TARGET_COUNT

: int , Target count for estimation the transfer function. This input terminal is not displayed by default.

Refer to Figure 6.164 for the addition method of hidden input.

Output

OUTPUT_INPROGRESS

: bool , shows the flag for the progressing. The output value is same as INPUT_INPROGRESS.

TRANSFER_FUNCTION

: TransferFunction , Transfer function data stream. This output terminal is not displayed by default.

Refer to Figure 6.165 for the addition method of hidden output.

Parameter

Table 6.153: Parameter list of CSP
 Parameter name Type Default value Unit description EST_TF_FILENAME Estimated transfer function file name LENGTH 512 [pt] FFT points ($NFFT$) SAMPLING_RATE 16000 [Hz] Sampling rate INPUT_TYPE TF Input type for the base transfer function BASE_TF_FILENAME Transfer function file name for the base IMPORT_INTERMEDIATE_DATA Directory name of the intermediate file group for the base EXPORT_INTERMEDIATE_DATA Directory name of the intermediate file group for export EXPORT_HISTORY_FILE false ON/OFF for history file output HISTORY_FILE_FRAMES 10000 Number of frames for exporting the history file HISTORY_FILE_ PERIOD 1 Period for exporting the history file INITIAL_TF_OUTPUT ALL Whether to output all data at the first LOOK_BACK_COUNT 10 The number of frames for look-back DEBUG false ON/OFF of debug output
EST_TF_FILENAME

: string type. There is no default value. The file name of the estimated transfer function file is designated. When INPUT_INPROGRESS becomes false, this node creates the estimated transfer function file.

LENGTH

: int  type. 512 is the default value. FFT point in the case of fourier transform. It is necessary to align it with the FFT points to the preceding paragraph.

SAMPLING_RATE

: int  type. 16000 is the default value. Sampling frequency of input acoustic signal. It is necessary to align with other nodes like LENGTH.

INPUT_TYPE

: string type. TF is the default value. The input type for the base transfer function is designated by TF or INTERMEDIATE. In the case of TF, BASE_TF_FILENAME should be designated for execution. In the case of INTERMEDIATE, IMPORT_INTERMEDIATE_DATA should be designated, and microphones.xml and source.xml should be existed there.

BASE_TF_FILENAME

: string type. There is no default value. The file name of the base transfer function file is designated. This parameter is shown when $INPUT\_ TYPE=TF$.

IMPORT_INTERMEDIATE_DATA

: string type. There is no default value. The directory name of the intermediate file group for base is designated. microphones.xml and source.xml should be existed in this directory. This parameter is shown when $INPUT\_ TYPE=INTERMEDIATE$.

EXPORT_INTERMEDIATE_DATA

: string type. There is no default value. The directory name of the intermediate file group for export is designated. When $EXPORT\_ HISTORY\_ FILE=true$, this parameter should be designated.

EXPORT_HISTORY_FILE

: bool type. falseis the default value. ON/OFF of the history file output. When $EXPORT\_ HISTORY\_ FILE=true$, this node outputs the history file to EXPORT_INTERMEDIATE_DATA.

HISTORY_FILE_FRAMES

: bool type. 10000 is the default value. Number of the frames for exporting history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.

HISTORY_FILE_PERIOD

: int type. 1 is default value. The cycle for output the history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.

INITIAL_TF_OUTPUT

: string type. Whether to output all data at the first. "ALL" outputs all data, and "PARTIAL" outputs only update date. The default value is ALL.

LOOK_BACK_COUNT

: int type. The number of frames for look-back. The default value is 10.

DEBUG

: bool  type. ON/OFF of the debug output and the format of the debug output are as follows. First, the updated source position is outputted. Then, the updated transfer function is shown.

### 6.9.1.5 Details of the node

Estimation of the transfer function :

The transfer function is estimated by averaging amplitude and phase of the input signal for each direction which is estimated by sound source localization.

The transfer function is estimated by following steps.

1. normalize the base transfer function

2. normalize the input spectrum

3. update the transfer function with normalized input spectrum by linear averaging

Normalization is calculated as $norm of amplitude=1$ and $average of phase=0deg$.

Intermediate file group :

Intermediate file group is consists of following file.

• whatisthis.txt...”transfer function”

• source.xml...source position file

• microphones.xml...microphone position file

• localization/tf#####.mat...transfer function files for localization

• separation/tf#####.mat...transfer function files for separation

• intermediate.mat...intermediate file

• history.mat...history file

When the base transfer function is input by the intermediate file group, source.xml and microphones.xml should be existed.

The intermediate file is used for additional update for the transfer function.

The file format of this file is the Matrix binary format, which type is float. The row data of the matrix means the information for each source position.

• Column 1 - 5 : TFID，position(x,y,z), Number of frames for the position

• Column 6 - $(M \times LENGTH \times 2)+5$ : Averaged value(real part and imaginary part) of the estimated transfer funcion. These values are stored in the order of $Microphone \times Frequency$.

• Column $(M \times LENGTH \times 2)+6$ - $(M \times LENGTH \times 2) \times 2+5$ : Varianced value(real part and imaginary part) of the estimated transfer funcion. These values are stored in the order of $Microphone \times Frequency$.

• Column 7 - $(M \times LENGTH \times 2)+6$ : Averaged value(real part and imaginary part) of the estimated transfer funcion. These values are stored in the order of $Microphone \times Frequency$.
• Column $(M \times LENGTH \times 2)+7$ - $(M \times LENGTH \times 2) \times 2+6$ : Varianced value(real part and imaginary part) of the estimated transfer funcion. These values are stored in the order of $Microphone \times Frequency$.