mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-10 16:02:25 +01:00
Voice replies, on-device speech, message cards and 0.1.0-alpha
Gearslip now reads messages aloud and takes replies by voice. It asks whether to reply, reads the reply back and sends it after a countdown. Say "cancel" or "change it" to stop or redo it, or tap a quick reply. Speech-to-text runs on the phone with whisper.cpp and a small Whisper model, so voice works without Google services. The model ships in the repo, so a fresh clone builds with nothing to download. New messages show as one card at the top right, with a bar counting down to when it closes or sends. Other changes: - Steering wheel buttons, knobs and D-pads drive the car screen. - Smoother car audio: chunks wait for the car instead of dropping. - Sharper, more responsive video. - The Gearslip switch in Settings now stops it taking the USB connection. - Apps that refuse Gearslip say so instead of loading forever. - The phone asks for notification permission. - The home screen stays upright. - The car screen shows what's new after an update.
This commit is contained in:
1 parent
1b2010f939
commit
e314aa8546
46 files changed
+2290
-229
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# Speech-to-text for voice replies and the assistant: whisper.cpp, pinned to one commit and
|
||||
# fetched at build time, so nothing outside this folder (cloned-repos included) is needed.
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(gearslip_speech CXX C)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Optimised in debug builds too. Unoptimised, Whisper runs several times slower, and a dev build
|
||||
# would make voice look far worse than what ships.
|
||||
foreach(lang C CXX)
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG "-O3 -DNDEBUG")
|
||||
endforeach()
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
whisper
|
||||
URL https://github.com/ggml-org/whisper.cpp/archive/6e4ab854f67f743900934a703d5603419384c961.tar.gz
|
||||
URL_HASH SHA256=55b585aec5e1bc03e2a5cea61da97c6406fa833996cf7daeed704972273cc039
|
||||
)
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||
set(WHISPER_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(WHISPER_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(WHISPER_BUILD_SERVER OFF CACHE BOOL "" FORCE)
|
||||
set(GGML_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(GGML_NATIVE OFF CACHE BOOL "" FORCE)
|
||||
# ARMv8.2 with half floats and dot products: every phone that runs Android 12 or later in
|
||||
# practice, and what makes Whisper fast enough to answer in under a second.
|
||||
set(GGML_CPU_ARM_ARCH "armv8.2-a+dotprod+fp16" CACHE STRING "" FORCE)
|
||||
FetchContent_MakeAvailable(whisper)
|
||||
|
||||
add_library(gearslip_speech SHARED speech_jni.cpp)
|
||||
target_compile_options(gearslip_speech PRIVATE -O3)
|
||||
find_library(LOG_LIB log)
|
||||
target_link_libraries(gearslip_speech whisper android ${LOG_LIB})
|
||||
target_link_options(gearslip_speech PRIVATE -Wl,--gc-sections -Wl,-z,max-page-size=16384)
|
||||
Reference in new issue
Block a user