-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPIO 29 used in example #2
Comments
On the rp2040-zero which I used for this, that pin was just in the right spot to solder it dead bug style (I also did not know it is the VSYS pin..) |
Good to know. Thank you. I thought you were using the RP Pico.
…On Wed, Mar 27, 2024, 09:06 biemster ***@***.***> wrote:
On the rp2040-zero which I used for this, that pin was just in the right
spot to solder it dead bug style (I also did not know it is the VSYS pin..)
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5LB7RH7K7UERFMJPENXDTY2K76FAVCNFSM6AAAAABFK6E4DWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSHA3DCMJXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have been testing your example code using an RP Pico W on a windows pc. I have changed the I2S pins to: |
I'm not sure what VS Code is doing in the terminal, but you need to convert the hex in the log to bytes. I use #!/usr/bin/env python
audiobuf = bytearray()
with open('COM6_2024_03_27.11.12.03.309.txt') as f:
for line in f:
audiobuf += bytes.fromhex(line)
with open('counting.wav', 'wb') as f:
f.write(audiobuf) When I tried either |
It's been a while since I worked on this, and my tests are on a since then decommissioned machine. |
Thanks for your help. Just for reference I verified my mics are good by
running Arduino code to record audio to SD card and replayed the audio on
my PC as wav file. Speech quality was good.
I noticed that you have the setting for STEREO, I tried MONO, with same
results. From what I can understand in your code, the output (individual
line in log file) sent to the terminal should be a 32 bit *signed* integer
in hex format or do I need to combine four of the 8 bit hex values to get
the 32 bit value?
Jim
…On Wed, Mar 27, 2024, 13:40 biemster ***@***.***> wrote:
It's been a while since I worked on this, and my tests are on a since then
decommissioned machine.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5LB7XGA5KALUVSDDERJFTY2MABLAVCNFSM6AAAAABFK6E4DWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTGY4DANJZGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm not sure what's the issue on your side. I've captured a small log from the serial port: and when I convert that with the bit of python I wrote above I can play the resulting wav file using |
Thanks for helping me and generating the log file. I will use it to
understand the data conversion and also dig deeper to find the issue.
Best Regards Jim
…On Wed, Mar 27, 2024 at 4:01 PM biemster ***@***.***> wrote:
I'm not sure what's the issue on your side. I've captured a small log from
the serial port:
hijim.log
<https://github.com/biemster/pico-serialmic/files/14781123/hijim.log>
and when I convert that with the bit of python I wrote above I can play
the resulting wav file using aplay jim.wav -r 16000 -c1 -fS32_BE just
fine.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5LB7S4RRJBEQ7KYXH2UG3Y2MQRDAVCNFSM6AAAAABFK6E4DWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTHE4DAOJTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have resolved one issue. I changed SCK, WS and SD pins on the Pico W and recording improved significantly for the audio format of MONO format only (one I2S microphone connected). Perhaps I was getting interference on the pins from the WIFI module??? Next Issue: To play the audio clearly (recorded at 16K Hz) I have to set the wav file rate to 8K Hz.
A log file is attached for ~10+ sec recording. The log file is of signed integer 32 samples. Settings: Format=MONO (single I2S microphone connected), BPS=32, RATE=16000. |
In your example you used GPIO29 for serial data (SD) connection to the INMP441 Mic. I am interested to know why you choose this particular pin since (from what I understand) it's not recommended since it is the VSYS pin.
The text was updated successfully, but these errors were encountered: