Config record mono audio in evkmimxrt1060_tensorflow_lite_kws

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Config record mono audio in evkmimxrt1060_tensorflow_lite_kws

1,098 次查看
nahan_trogn
Contributor III

Hi NXP,

In evkmimxrt1060_tensorflow_lite_kws, the example uses stereo audio to predict. Because there is only 1 mic on board (right channel), so the left channel's value is 0.

I want to change config from Stereo to Mono. I had changed

From

SAI_GetClassicI2SConfig(&g_transceiverConfig, DEMO_AUDIO_BIT_WIDTH, kSAI_Stereo, kSAI_Channel0Mask)

to              

SAI_GetClassicI2SConfig(&g_transceiverConfig, DEMO_AUDIO_BIT_WIDTH,kSAI_MonoRight, kSAI_Channel0Mask)

.But I think I miss something in config (Because the time to get buffer full is double than the original config).

1. I think I had to reconfig clock or something else...?

2. I found SAI_RxSetBitClockRate(DEMO_SAI, DEMO_AUDIO_MASTER_CLOCK, DEMO_AUDIO_SAMPLE_RATE, DEMO_AUDIO_BIT_WIDTH,
DEMO_AUDIO_DATA_CHANNEL). What is this config used for? The DEMO_AUDIO_DATA_CHANNEL means? If I record mono, then the DEMO_AUDIO_DATA_CHANNEL = 1?

Thanks in advance.

标签 (1)
标记 (2)
0 项奖励
回复
4 回复数

1,040 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

To work in mono-right mode, you need to implement the following changes. 

1. Set the DEMO_AUDIO_DATA_CHANNEL to 2.

2. Set two channels as the input of the WM8960 like this:

wm8960Config.leftInputSource = kWM8960_InputDifferentialMicInput3,
wm8960Config.rightInputSource = kWM8960_InputDifferentialMicInput2;

3. Set the kSAI_MonoRight(01), this means that we will ignore the left word.

SAI_GetClassicI2SConfig(&g_transceiverConfig, DEMO_AUDIO_BIT_WIDTH, kSAI_MonoRight, kSAI_Channel0Mask);

I already made the tests on my end, and everything worked as expected. 

Regards,
Victor 

0 项奖励
回复

1,079 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

I'm checking this internally, I will provide you an update as soon as possible.

Regards,
Victor 

0 项奖励
回复

1,054 次查看
nahan_trogn
Contributor III

Hi, can you answer me now?

0 项奖励
回复

1,076 次查看
nahan_trogn
Contributor III

I look forward to hearing from you soon.

Thanks.

0 项奖励
回复