Change Record time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Record time

Jump to solution
901 Views
nahan_trogn
Contributor III
Hi, I can run the evkmimxrt1060_tensorflow_lite_kws example. But now, I want to change the time of recording my voice. For instance, I want the micro record my voice in 2s, then preprocessing it and inference the output. How can I achive this? Thanks.
0 Kudos
1 Solution
847 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1. In my case, if I want to process 2s audio, I will set the NUM_FRAMES = 100-1?
-- Yes.
2. In tensorflow_lite_kws example, does the micro automatically record? How I handle to start/stop record by manual? I want to use timer 2s to record the voice then process it.
-- Yes, the micro records automatically, of course, you can handle it manually, however, you'd better spend time to know the software architecture prior to change the demo code, as the demo code is more complicated than other demos in the SDK library.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
7 Replies
876 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) How can I achieve this?
-- Firstly, you need to retrain the model to suit for 2-second voice data, please refer to the article to make it, next, modify the macro definition:NUM_FRAMES which residers in kws_mfcc.hpp in tensorflow_lite_kws demo, it's easy to do it.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

872 Views
nahan_trogn
Contributor III

Thanks for the answer,

So 1 NUM_FRAMES = FRAME_SHIFT_MS = 20ms in tensorflow_lite_kws example?

0 Kudos
865 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) So 1 NUM_FRAMES = FRAME_SHIFT_MS = 20ms in tensorflow_lite_kws example?
-- No, NUM_FRAMES stands for the amount of the frequency analysis sample, and FRAME_SHIFT_MS stands for how far apart each frequency analysis sample is from the previous.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

860 Views
nahan_trogn
Contributor III

Thanks for your answer,

1. In my case, if I want to process 2s audio, I will set the NUM_FRAMES  = 100-1 ?

2. In tensorflow_lite_kws example, does the micro automatically record? How I handle to start/stop record by manual? I want to use timer 2s to record the voice then process it.

Wish you a nice day.

0 Kudos
848 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1. In my case, if I want to process 2s audio, I will set the NUM_FRAMES = 100-1?
-- Yes.
2. In tensorflow_lite_kws example, does the micro automatically record? How I handle to start/stop record by manual? I want to use timer 2s to record the voice then process it.
-- Yes, the micro records automatically, of course, you can handle it manually, however, you'd better spend time to know the software architecture prior to change the demo code, as the demo code is more complicated than other demos in the SDK library.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
818 Views
nahan_trogn
Contributor III

The micro records automatically and save the audio to a buffer. Where can I find that buffer and how much data can this buffer store?

0 Kudos
805 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
audioBuff array is used to save the audio data.
Hope this is clear.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos