chore(tts): stage local changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Submodule
+1
Submodule .espressif/esp-idf added at 97d9585357
@@ -0,0 +1,31 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
cmake:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: cmake -S . -B build
|
||||
- name: Build
|
||||
run: cmake --build build --config Release --parallel
|
||||
- name: CTest smoke
|
||||
run: |
|
||||
if [ -f build/CTestTestfile.cmake ]; then
|
||||
ctest --test-dir build --output-on-failure
|
||||
else
|
||||
echo "No CTest tests discovered"
|
||||
fi
|
||||
+14
-6
@@ -51,7 +51,7 @@ set_source_files_properties(
|
||||
|
||||
# PicoTTS attempts to use exp() trickery which relies on a particular floating
|
||||
# point representation format, which seemingly does not hold on Xtensa. As
|
||||
# a workaround, we rename the picoos_quick_exp functin and provide our own
|
||||
# a workaround, we rename the picoos_quick_exp function and provide our own
|
||||
# wrapper back to standard math.h exp() instead.
|
||||
set_source_files_properties(
|
||||
"pico/lib/picoos.c"
|
||||
@@ -84,13 +84,21 @@ elseif(CONFIG_PICOTTS_LANGUAGE_IT_IT)
|
||||
set(PICOTTS_SG_SRC "it-IT_cm0_sg.bin")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${PICOTTS_TA_BIN} COMMAND ${CMAKE_COMMAND} -E copy ${PICOTTS_LANG_DIR}/${PICOTTS_TA_SRC} ${PICOTTS_TA_BIN_PATH})
|
||||
add_custom_command(OUTPUT ${PICOTTS_SG_BIN} COMMAND ${CMAKE_COMMAND} -E copy ${PICOTTS_LANG_DIR}/${PICOTTS_SG_SRC} ${PICOTTS_SG_BIN_PATH})
|
||||
add_custom_command(
|
||||
OUTPUT ${PICOTTS_TA_BIN_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PICOTTS_LANG_DIR}/${PICOTTS_TA_SRC} ${PICOTTS_TA_BIN_PATH}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT ${PICOTTS_SG_BIN_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PICOTTS_LANG_DIR}/${PICOTTS_SG_SRC} ${PICOTTS_SG_BIN_PATH}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(picotts_ta_bin_gen DEPENDS ${PICOTTS_TA_BIN_PATH})
|
||||
add_custom_target(picotts_sg_bin_gen DEPENDS ${PICOTTS_SG_BIN_PATH})
|
||||
set_property(DIRECTORY "${COMPONENT_DIR}" APPEND PROPERTY
|
||||
ADDITIONAL_CLEAN_FILES ${PICOTTS_TA_BIN} ${PICOTTS_SG_BIN})
|
||||
ADDITIONAL_CLEAN_FILES ${PICOTTS_TA_BIN_PATH} ${PICOTTS_SG_BIN_PATH})
|
||||
|
||||
if(${CONFIG_PICOTTS_RESOURCE_MODE_PARTITION})
|
||||
partition_table_get_partition_info(part_ta_size "--partition-name ${CONFIG_PICOTTS_TA_PARTITION}" "size")
|
||||
@@ -98,14 +106,14 @@ if(${CONFIG_PICOTTS_RESOURCE_MODE_PARTITION})
|
||||
if ("${part_ta_size}" AND "${part_ta_offs}")
|
||||
esptool_py_flash_to_partition(flash "${CONFIG_PICOTTS_TA_PARTITION}" "${PICOTTS_TA_BIN_PATH}")
|
||||
else()
|
||||
set(message "Failed to find ${CONFIG_PICOTTS_TA_PARTITION} in partition table")
|
||||
message(FATAL_ERROR "Failed to find ${CONFIG_PICOTTS_TA_PARTITION} in partition table")
|
||||
endif()
|
||||
partition_table_get_partition_info(part_sg_size "--partition-name ${CONFIG_PICOTTS_SG_PARTITION}" "size")
|
||||
partition_table_get_partition_info(part_sg_offs "--partition-name ${CONFIG_PICOTTS_SG_PARTITION}" "offset")
|
||||
if ("${part_sg_size}" AND "${part_sg_offs}")
|
||||
esptool_py_flash_to_partition(flash "${CONFIG_PICOTTS_SG_PARTITION}" "${PICOTTS_SG_BIN_PATH}")
|
||||
else()
|
||||
set(message "Failed to find ${CONFIG_PICOTTS_SG_PARTITION} in partition table")
|
||||
message(FATAL_ERROR "Failed to find ${CONFIG_PICOTTS_SG_PARTITION} in partition table")
|
||||
endif()
|
||||
add_dependencies(${COMPONENT_LIB} picotts_ta_bin_gen picotts_sg_bin_gen)
|
||||
else()
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
This Source Code Form is subject to the terms of the Mozilla Public License,
|
||||
v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||
obtain one at https://mozilla.org/MPL/2.0/.
|
||||
@@ -94,3 +94,51 @@ The partition sizes may be shrunk to better match the language you're using. Wha
|
||||
## Examples
|
||||
|
||||
The [boot\_greeting](examples/boot_greeting/README.md) example is written for ESP-BOX and uses this component to issue a greeting upon boot.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- CHANTIER:AUDIT START -->
|
||||
## Audit & Execution Plan (2026-03-10)
|
||||
|
||||
### Snapshot
|
||||
- Priority: `P2`
|
||||
- Tech profile: `cpp/cmake`
|
||||
- Workflows: `yes`
|
||||
- Tests: `yes`
|
||||
- Debt markers: `0`
|
||||
- Source files: `71`
|
||||
|
||||
### Corrections Prioritaires
|
||||
- [ ] Ajouter smoke build CMake
|
||||
- [ ] Ajouter/fiabiliser les commandes de vérification automatiques.
|
||||
- [ ] Clore les points bloquants avant optimisation avancée.
|
||||
|
||||
### Optimisation
|
||||
- [ ] Identifier le hotspot principal et mesurer avant/après.
|
||||
- [ ] Réduire la complexité des modules les plus touchés.
|
||||
|
||||
### Mémoire chantier
|
||||
- Control plane: `/Users/electron/.codex/memories/electron_rare_chantier`
|
||||
- Repo card: `/Users/electron/.codex/memories/electron_rare_chantier/REPOS/esp-picotts.md`
|
||||
|
||||
<!-- CHANTIER:AUDIT END -->
|
||||
|
||||
+7
-7
@@ -20,18 +20,18 @@
|
||||
|
||||
static uint16_t esp_pico_load_pi_u16(const char *raw, unsigned offs)
|
||||
{
|
||||
uint16_t a = raw[offs];
|
||||
uint16_t b = raw[offs+1];
|
||||
uint16_t a = (uint8_t)raw[offs];
|
||||
uint16_t b = (uint8_t)raw[offs+1];
|
||||
return (b << 8 | a);
|
||||
}
|
||||
|
||||
static uint32_t esp_pico_load_pi_u32(const char *raw, unsigned offs)
|
||||
{
|
||||
uint32_t a = raw[offs];
|
||||
uint32_t b = raw[offs+1];
|
||||
uint32_t c = raw[offs+2];
|
||||
uint32_t d = raw[offs+3];
|
||||
return (d << 24 || c << 16 | b << 8 | a);
|
||||
uint32_t a = (uint8_t)raw[offs];
|
||||
uint32_t b = (uint8_t)raw[offs+1];
|
||||
uint32_t c = (uint8_t)raw[offs+2];
|
||||
uint32_t d = (uint8_t)raw[offs+3];
|
||||
return (d << 24) | (c << 16) | (b << 8) | a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+9
-4
@@ -188,7 +188,10 @@ static void esp_pico_run(void *)
|
||||
status =
|
||||
pico_getData(picoEngine, outbuf, sizeof(outbuf), &bytes, &type);
|
||||
if (bytes > 0)
|
||||
outputCb(outbuf, bytes/2);
|
||||
{
|
||||
if (outputCb)
|
||||
outputCb(outbuf, bytes / 2);
|
||||
}
|
||||
} while (status == PICO_STEP_BUSY);
|
||||
if (status != PICO_STEP_IDLE)
|
||||
{
|
||||
@@ -205,11 +208,10 @@ static void esp_pico_run(void *)
|
||||
}
|
||||
}
|
||||
ESP_LOGI(tag, "Exiting task");
|
||||
xSemaphoreGive(exitLock);
|
||||
vTaskDelete(NULL);
|
||||
|
||||
if (error && errorCb)
|
||||
errorCb();
|
||||
xSemaphoreGive(exitLock);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -357,6 +359,9 @@ bool picotts_init(unsigned prio, picotts_output_fn cb, int core)
|
||||
|
||||
void picotts_add(const char *text, unsigned len)
|
||||
{
|
||||
if (!textQ || !text || !len)
|
||||
return;
|
||||
|
||||
while(len--)
|
||||
xQueueSendToBack(textQ, text++, portMAX_DELAY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user