feat: Add BookPlayer app and update CI build matrix
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
Build:
|
Build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
app_name: [Brainfuck, Breakout, Calculator, Diceware, EpubReader, GPIO, GraphicsDemo, HelloWorld, M5UnitTest, Magic8Ball, MediaKeys, MystifyDemo, SerialConsole, Snake, TamaTac, TodoList, TwoEleven]
|
app_name: [Brainfuck, Breakout, BookPlayer, Calculator, Diceware, EpubReader, GPIO, GraphicsDemo, HelloWorld, M5UnitTest, Magic8Ball, MediaKeys, MystifyDemo, SerialConsole, Snake, TamaTac, TodoList, TwoEleven]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
|
||||||
|
if (DEFINED ENV{TACTILITY_SDK_PATH})
|
||||||
|
set(TACTILITY_SDK_PATH $ENV{TACTILITY_SDK_PATH})
|
||||||
|
else()
|
||||||
|
set(TACTILITY_SDK_PATH "../../release/TactilitySDK")
|
||||||
|
message(WARNING "⚠️ TACTILITY_SDK_PATH environment variable is not set, defaulting to ${TACTILITY_SDK_PATH}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include("${TACTILITY_SDK_PATH}/TactilitySDK.cmake")
|
||||||
|
set(EXTRA_COMPONENT_DIRS ${TACTILITY_SDK_PATH})
|
||||||
|
|
||||||
|
project(BookPlayer)
|
||||||
|
tactility_project(BookPlayer)
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Tactility Book Player App
|
||||||
|
|
||||||
|
The Book Player app for Tactility OS plays children's books stored on the SD card. Each book is organized in its own subfolder and contains a sequential layout of pages with both visual illustrations (images) and narration (audio).
|
||||||
|
|
||||||
|
## SD Card Layout
|
||||||
|
|
||||||
|
Books must be stored under `/sdcard/books/` on the device SD card with the following structure:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/sdcard/books/
|
||||||
|
book_slug_1/
|
||||||
|
manifest.json
|
||||||
|
page001.png
|
||||||
|
page001.mp3
|
||||||
|
page002.png
|
||||||
|
page002.mp3
|
||||||
|
...
|
||||||
|
book_slug_2/
|
||||||
|
manifest.json
|
||||||
|
page001.jpg
|
||||||
|
page001.wav
|
||||||
|
page002.jpg
|
||||||
|
page002.wav
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Manifest Format
|
||||||
|
|
||||||
|
Each book subfolder must contain a `manifest.json` file. Here is a sample format:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"title": "Princess Grace and Poppy",
|
||||||
|
"author": "Reyna Family",
|
||||||
|
"id": "grace-poppy",
|
||||||
|
"format": "tactility-book-manifest-v1",
|
||||||
|
"display": {
|
||||||
|
"width": 320,
|
||||||
|
"height": 240
|
||||||
|
},
|
||||||
|
"audio": {
|
||||||
|
"encoding": "mp3",
|
||||||
|
"sample_rate_hz": 16000,
|
||||||
|
"channels": 1,
|
||||||
|
"bitrate_kbps": 24
|
||||||
|
},
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"image": "page001.png",
|
||||||
|
"audio": "page001.mp3",
|
||||||
|
"caption": "Once upon a time, in a magnificent castle perched high on a hill above the sea, there lived five princesses..."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image": "page002.png",
|
||||||
|
"audio": "page002.mp3",
|
||||||
|
"caption": "This is the story of Princess Grace..."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Content Requirements
|
||||||
|
|
||||||
|
- **Images**: PNG or JPG format. Recommended size is `320×240` pixels (or scaled to match standard aspect ratios).
|
||||||
|
- **Audio**: Mono `MP3` or uncompressed standard `WAV` files. For ESP32-S3 systems, lower sampling rates (e.g. 16 kHz mono) are recommended for memory efficiency.
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
file(GLOB_RECURSE SOURCE_FILES Source/*.c)
|
||||||
|
set(CJSON_SOURCE "$ENV{IDF_PATH}/components/json/cJSON/cJSON.c")
|
||||||
|
|
||||||
|
idf_component_register(
|
||||||
|
SRCS ${SOURCE_FILES} ${CJSON_SOURCE}
|
||||||
|
INCLUDE_DIRS Source "$ENV{IDF_PATH}/components/json/cJSON"
|
||||||
|
REQUIRES TactilitySDK
|
||||||
|
)
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
[manifest]
|
||||||
|
version=0.1
|
||||||
|
[target]
|
||||||
|
sdk=0.8.0-dev
|
||||||
|
platforms=esp32s3
|
||||||
|
[app]
|
||||||
|
id=one.tactility.bookplayer
|
||||||
|
versionName=1.0.0
|
||||||
|
versionCode=1
|
||||||
|
name=Book Player
|
||||||
Reference in New Issue
Block a user