Comments (9)
Hey Steve,
I think they are sharing the same I2S interface for both the speaker and the microphone. I'm guessing that they must have the BCLK connected internally as I'm not sure how it can work otherwise.
Looking at the sample code here. It looks like you can't use the speaker at the same time as the mic. There's a couple of issues, it looks like both the speaker and the mic are on the right channel - so they will conflict, and the mic is using PDM format which won't work with the speaker.
This shouldn't be a problem as we don't really need to listen when playing sound.
It will need a bit of a fundamental change in how the code currently works though as the code currently uses the samples coming from the microphone to drive the state machine even when not listening.
Let me have a think if the code can be easily refactored to do this as it looks like it should be possible.
Cheers
Chris
from diy-alexa.
Hi,
could it be that the "Mic CLK" is the I2S_MIC_LEFT_RIGHT_CLOCK? If yes then the I2S_MIC_SERIAL_CLOCK is missing (or internal used as you mentioned)?
And thanks to your analysis it make sense...
I currently testing the "M5Stack Atom Echo" examples despite the fact that "Atom Echo" is not support at PlatfromIO. Instead I use the M5StickC, not shure if this is 100% correct?
Do have Atom Echo running with your code/use case whould be lower the efforts for other users. More users could mean more testing!
:-)
Thx
from diy-alexa.
Yes, mic clk is the I2S_MIC_LEFT_RIGHT_CLOCK. Here's the pins from their sample code:
#define CONFIG_I2S_BCK_PIN 19
#define CONFIG_I2S_LRCK_PIN 33
#define CONFIG_I2S_DATA_PIN 22
#define CONFIG_I2S_DATA_IN_PIN 23
I think you are correct - the mic does not need a serial clock as it is using PDM output which I think doesn't need a serial clock.
I will see if I can get hold of atom echo and see if I can get it to work.
We'll need to work out how to change the code so that the I2S input stops to do the output. This might be a bit fiddly but could just fit in with how the current state machine works.
from diy-alexa.
Hi,
the Atom Echo is very, very cheap but don't expect much from the internal speaker. I will try to print a small "Gramaphone Horn" to amplify the Atom Speaker Volume.
BTW, the hint with PDM and "switching" Mic and Speaker is very valueable. I will follow this hint.
Thx
from diy-alexa.
ok, will take around 14 days for it to arrive, meanwhile I'll have a think about how to reorganise the code.
from diy-alexa.
Hi,
wouldn't we save GPIO Pins if we use the same "Atom Echo I2S Wiring"?
I ask because I want to use a JTAG Debugger and currently the GPIO12 and 14 are occupied .
Thx and lets continue in 2 weeks...
from diy-alexa.
Hey Steve,
You should be able to move the pins around - I think the I2S interface can work on any pin.
The only issue with the Atom Echo wiring is that you can't use the microphone and speaker at the same time - so you need to switch between the two - probably not a big issue, but annoying with the code as it :)
Cheers
Chris
from diy-alexa.
Hi Chris,
I used the other code from your "voice-controlled robot" repo because it was easier to adapt to Atom Echo Mic.
It worked!
I commited the changes to my fork of your repo.
:-)
Next will be the Atom Echo Speaker...
Cheers
Steve
from diy-alexa.
Solved...thanks for the support.
:-)
from diy-alexa.
Related Issues (20)
- how to implement the code to esp32 HOT 1
- Can you reuse pin for audio input and output ? HOT 3
- export tflite model to c++
- DIY Alexa not connecting to wifi HOT 1
- DIY Alexa not working
- DIY Alexa is not response HOT 6
- I CANT GET SOUND OUTPUT HOT 2
- Guru Meditation Error HOT 1
- Limitations to .WAV file? HOT 1
- INMP441 microphone issue
- Not an issue but more of a question on how to complie the code HOT 1
- detect wakeword process not working HOT 2
- cannot compile code HOT 1
- INMP441 not working HOT 5
- ADC-related compile errors when shifting to ESP32S3 HOT 5
- Tensorflow.io import gfile
- How to customize keyword on my dataset?
- How to custom Wake Word model ?
- Issue while running the Jupyter notebook Generate Training data HOT 1
- Program is resetting continuously HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diy-alexa.