This node creates the estimated transfer function file using the input signal.
This transfer function is calculated by the following steps.
record the input signal from the sound source which generates noise such as white noise.
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.
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.
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.
Input
: Matrix<complex<float> > , Complex frequency representation of input signals with size $M \times (NFFT/2+1)$.
: Source position (direction) is expressed as Vector<ObjectRef> type. ObjectRef is a Source and is a structure which is consists of the source position.
: bool , shows the flag for the progressing. When this input becomes false, this node creates the transfer function file.
: bool , Flag for data transfer. If 1/true, transfers transfer function data.
: bool , Flag for data reset. If 1/true, resets and transfers all transfer function data.
: bool , Flag for data transfer all. If 1/true, transfers all transfer function data.
: 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
: bool , shows the flag for the progressing. The output value is same as INPUT_INPROGRESS.
: 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
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 |
: 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.
: 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.
: int type. 16000 is the default value. Sampling frequency of input acoustic signal. It is necessary to align with other nodes like LENGTH.
: 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.
: 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$.
: 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$.
: 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.
: 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.
: bool type. 10000 is the default value. Number of the frames for exporting history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.
: int type. 1 is default value. The cycle for output the history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.
: 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.
: int type. The number of frames for look-back. The default value is 10.
: 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.
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.
normalize the base transfer function
normalize the input spectrum
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.
About the intermediate file :
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$.
About the history file :
The history file is used for the analysis of estimating the trunsfer function. This files shows the alteration of the averaged value and the varianced value of the transfer function according to update. The cycle of writing the history is designated by HISTORY_FILE_PERIOD. When the written size of history data is over the HISTORY_FILE_FRAMES, the oldedst history data is overwritten by the new history data.
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 history data.
Column 1 - 6 : Index of frame, TFID,position(x,y,z), Number of frames for the position
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$.