I2S microphone (RX)
Re: I2S microphone (RX)
i'm ordering a couple ICS-43434 now, thanks for the tip BuddyCasino,
As for I2S_COMM_FORMAT_RAW_I2S flag, ??? sorry about that, I blame it on blurry vision and lack of sleep. I intended to write "I2S_COMM_FORMAT_I2S"
As for I2S_COMM_FORMAT_RAW_I2S flag, ??? sorry about that, I blame it on blurry vision and lack of sleep. I intended to write "I2S_COMM_FORMAT_I2S"
Re: I2S microphone (RX)
Just FYI, I am having a production run of ICS43434 microphones made and these will be available on Tindie in a few weeks. In the meantime I have a supply of about a dozen hand-assembled ones.
Is there some way to make use of the ICS43434 and this I2S audio coding in the Arduino IDE?
Is there some way to make use of the ICS43434 and this I2S audio coding in the Arduino IDE?
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: I2S microphone (RX)
Looks like someone has got his Google Alerts setup properly.
I don't use Arduino, so I have no idea. Using the ESP-IDF is not hard though.Is there some way to make use of the ICS43434 and this I2S audio coding in the Arduino IDE?
Re: I2S microphone (RX)
It is for dummy users like me!
Re: I2S microphone (RX)
i miss your smilieonehorse wrote:It is for dummy users like me!
other language - other need
sometimes very complex - sometime very easy
no there is nothing wrong with arduino -
only some guys have no contact to arduino - ( i am too )
i am self prog not directly in arduino
but prog for arduino libs ...
and sure - you can use the code from buddy_casino in arduino too - ( I2S )
how you develop arduino?
do you use ESP32-Arduino IDE ?
then it is very easy to do this.
use arduino ide?
then you need smal steps to run buddy_casino's code
but this is, cause the hardware must be update in the IDE to esp32...
tell how you do your programming.
and your code runs on weekend for you
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: I2S microphone (RX)
ah how is the commissiononehorse wrote:Just FYI, I am having a production run of ICS43434 microphones made and these will be available on Tindie in a few weeks. In the meantime I have a supply of about a dozen hand-assembled ones.
Is there some way to make use of the ICS43434 and this I2S audio coding in the Arduino IDE?
fun
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: I2S microphone (RX)
Guys,
Anyone made it to create a simple recording functionality with discussed I2S mics?
Tried to store the bytes read from the mic and store as they are, apparently I can not do playback well. The result playback somehow is too fast.
Thanks for any ideas and directions.
Anyone made it to create a simple recording functionality with discussed I2S mics?
Tried to store the bytes read from the mic and store as they are, apparently I can not do playback well. The result playback somehow is too fast.
Thanks for any ideas and directions.
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: I2S microphone (RX)
If you used the same sample rate and bit depth for recording and playback, it may be because of mono / stereo issues. You might want to take a look at my megaphone example.andriy wrote:The result playback somehow is too fast.
Re: I2S microphone (RX)
Hi all!
I'm trying to store in a buffer array (with no luck) the voice captured from my I2S mic (https://www.adafruit.com/product/3421) in order to execute a speech to text recognition on my server. I wrote some code (after reading your comments) but I'm probably missing something because the audio file stored on the cloud is basically "empty".
This is my code (I'm a super beginner in this world):
Any ideas?
Thank you!
I'm trying to store in a buffer array (with no luck) the voice captured from my I2S mic (https://www.adafruit.com/product/3421) in order to execute a speech to text recognition on my server. I wrote some code (after reading your comments) but I'm probably missing something because the audio file stored on the cloud is basically "empty".
This is my code (I'm a super beginner in this world):
Code: Select all
#include "driver/i2s.h"
#define SAMPLES 128 // make it a power of two for best DMA performance
#define SPEECH_BUFFER_SIZE 40960
uint32_t speech_buffer[SPEECH_BUFFER_SIZE];
int last_position_written = 0;
void i2s_config() {
// input
i2s_config_t i2s_in_config = {
mode: (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX),
sample_rate: 16000,
bits_per_sample: (i2s_bits_per_sample_t)32,
channel_format: I2S_CHANNEL_FMT_RIGHT_LEFT,
communication_format: (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
intr_alloc_flags: ESP_INTR_FLAG_LEVEL1,
dma_buf_count: 14,
dma_buf_len: 64
};
i2s_pin_config_t i2s_in_pin_config = {
bck_io_num: 16,
ws_io_num: 4,
data_out_num: -1, //Not used
data_in_num: 17
};
pinMode(17, INPUT);
pinMode(16, OUTPUT);
pinMode(4, OUTPUT);
i2s_driver_install((i2s_port_t)0, &i2s_in_config, 0, NULL);
i2s_set_pin((i2s_port_t)0, &i2s_in_pin_config);
}
void setup()
{
Serial.begin(115200);
delay(4000);
i2s_config();
}
void loop()
{
//get sample from mic
for (int i = 0; i < SAMPLES; i++) {
int sample = 0;
uint32_t sample_val[2] = {0, 0};
bytes_read += i2s_pop_sample((i2s_port_t)0, (char *)sample_val, portMAX_DELAY);
samples_for_buffer[i] = (sample_val[0] << 5);
}
merge_buffer(samples_for_buffer);
}
void merge_buffer(uint32_t samples_for_buffer[]) {
//if the buffer reach the max size send it to the cloud
....
//else merge buffer
for (int j = 0; j < SAMPLES; j++) {
speech_buffer[last_position_written] = samples_for_buffer[j];
last_position_written++;
}
}
Thank you!
-
- Posts: 44
- Joined: Mon Nov 07, 2016 5:04 pm
Re: I2S microphone (RX)
Where can we find your megaphone example?BuddyCasino wrote:... You might want to take a look at my megaphone example.
*** EDIT - Found it on page two of this discussion here: https://esp32.com/viewtopic.php?f=13&t= ... t=10#p9283
Who is online
Users browsing this forum: federicolonghin and 215 guests