sample rate fix
This commit is contained in:
parent
be05eff944
commit
7ca4f00c99
4 changed files with 5 additions and 8 deletions
|
|
@ -52,15 +52,10 @@ Realtime AI Speech powered by SoTA AI voice models like **OpenAI Realtime API**,
|
|||
## ⚡️ `With SOTA Realtime AI Speech Models on an ESP32`
|
||||
|
||||
<div align="center" class="flex flex-row gap-4">
|
||||
|
||||
<img src="assets/openai.png" alt="OpenAI Realtime API" width="45%">
|
||||
|
||||
<img src="assets/gemini.png" alt="Gemini Live API" width="45%">
|
||||
|
||||
<img src="assets/humeai.avif" alt="Hume AI EVI4" width="45%">
|
||||
|
||||
<img src="assets/elevenlabs.svg" alt="Eleven Labs AI Agents" width="45%">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void micTask(void *parameter) {
|
|||
// Configure and start I2S input stream.
|
||||
auto i2sConfig = i2sInput.defaultConfig(RX_MODE);
|
||||
i2sConfig.bits_per_sample = BITS_PER_SAMPLE;
|
||||
i2sConfig.sample_rate = 16000;
|
||||
i2sConfig.sample_rate = MIC_SAMPLE_RATE;
|
||||
i2sConfig.channels = CHANNELS;
|
||||
i2sConfig.i2s_format = I2S_LEFT_JUSTIFIED_FORMAT;
|
||||
i2sConfig.channel_format = I2S_CHANNEL_FMT_ONLY_LEFT;
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ volatile bool sleepRequested = false;
|
|||
*/
|
||||
|
||||
#ifdef DEV_MODE
|
||||
const char *ws_server = "192.168.68.119";
|
||||
const char *ws_server = "192.168.1.37";
|
||||
const uint16_t ws_port = 8000;
|
||||
const char *ws_path = "/";
|
||||
// Backend server details
|
||||
const char *backend_server = "192.168.68.119";
|
||||
const char *backend_server = "192.168.1.37";
|
||||
const uint16_t backend_port = 3000;
|
||||
|
||||
#elif defined(PROD_MODE)
|
||||
|
|
@ -64,6 +64,7 @@ volatile DeviceState deviceState = IDLE;
|
|||
|
||||
// I2S and Audio parameters
|
||||
const uint32_t SAMPLE_RATE = 24000;
|
||||
const uint32_t MIC_SAMPLE_RATE = 16000;
|
||||
|
||||
// ----------------- Pin Definitions -----------------
|
||||
const i2s_port_t I2S_PORT_IN = I2S_NUM_1;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ extern const uint16_t backend_port;
|
|||
|
||||
// I2S and Audio parameters
|
||||
extern const uint32_t SAMPLE_RATE;
|
||||
extern const uint32_t MIC_SAMPLE_RATE;
|
||||
|
||||
extern const int BLUE_LED_PIN;
|
||||
extern const int RED_LED_PIN;
|
||||
|
|
|
|||
Loading…
Reference in a new issue