Skip to content

Commit

Permalink
Avoid use hard coded size of partition in tts_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
yyjdelete authored Feb 27, 2024
1 parent 33ba0c5 commit e80f487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/audio_stream/tts_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ audio_element_handle_t tts_stream_init(tts_stream_cfg_t *config)
});

uint16_t* voicedata = NULL;
esp_err_t err = esp_partition_mmap(part, 0, 3 * 1024 * 1024, SPI_FLASH_MMAP_DATA, (const void**)&voicedata, &tts_stream->mmap);
esp_err_t err = esp_partition_mmap(part, 0, part->size, SPI_FLASH_MMAP_DATA, (const void**)&voicedata, &tts_stream->mmap);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Couldn't map voice data partition!");
goto _tts_stream_init_exit;
Expand Down

0 comments on commit e80f487

Please sign in to comment.