Config record mono audio in evkmimxrt1060_tensorflow_lite_kws

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Config record mono audio in evkmimxrt1060_tensorflow_lite_kws

883件の閲覧回数
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 返答(返信)

825件の閲覧回数
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 件の賞賛
返信

864件の閲覧回数
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

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

Regards,
Victor 

0 件の賞賛
返信

839件の閲覧回数
nahan_trogn
Contributor III

Hi, can you answer me now?

0 件の賞賛
返信

861件の閲覧回数
nahan_trogn
Contributor III

I look forward to hearing from you soon.

Thanks.

0 件の賞賛
返信