Voca - Text-to-Speech App
A privacy-focused Text-to-Speech (TTS) app for Android that respects system language settings and provides a clean, simple interface.
Features
- Text-to-Speech with system language support
- Dark/Light mode toggle
- Share text directly to app
- Respects system TTS settings
- Privacy-focused (no permissions required)
- Lightning address support for donations
Usage
-
Basic Usage
- Enter text in the input field
- Press "Speak" to hear the text
- Toggle dark mode using the switch
-
Language Settings
- Press "TTS Settings" to configure TTS
- The app uses your system's TTS settings
- Language changes take effect immediately
-
Sharing Text
- Share text from any app to Voca
- The app will automatically load the shared text
- Press "Speak" to hear the shared text
-
Support
- Use the "Support Voca" button to donate
- Lightning address: voca@npub.cash
Privacy
- No internet permission required
- No data collection
- All processing done locally
- Uses system TTS engine
Building
To build the app:
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleRelease
Signing Configuration
For release builds, you need to set up a signing configuration:
-
Copy the template file to create your keystore properties file:
cp keystore.properties.template keystore.properties
-
Generate a keystore file if you don't have one:
keytool -genkey -v -keystore release.keystore -alias your_key_alias -keyalg RSA -keysize 2048 -validity 10000
-
Update the
keystore.properties
file with your keystore details:storeFile=release.keystore storePassword=your_keystore_password keyAlias=your_key_alias keyPassword=your_key_password
This file is excluded from version control for security reasons.
Requirements
- Android 8.0 (API 26) or higher
- System TTS engine installed
- Language data for desired languages
Release Process
Voca uses a Git-based workflow for releasing to the Zap Store.
Automatic Release
-
Run the prepare-release script with the new version:
./scripts/prepare-release.sh 0.0.7
-
Update the generated release notes in
release_notes.md
-
Commit and push your changes:
git add . git commit -m "chore: prepare release v0.0.7" git push origin main
-
Create and push a tag:
git tag 0.0.7 git push origin 0.0.7
The CI/CD pipeline will automatically:
- Build the release APK
- Create a Zap Store package
- Create a release in Gitea
- Upload assets to the release
- Submit the package to the Zap Store
For more details, see Zap Store Release Process. # SSH test
SSH test
MP3 Conversion Feature
This app supports MP3 conversion using two libraries:
- AndroidLame: For converting audio files or PCM audio data to MP3 format.
- Sherpa-ONNX TTS: For text-to-speech synthesis with natural voice.
Setup Requirements
To use the MP3 conversion feature, you need to add the Sherpa TTS model files:
- Download a Sherpa TTS model package from https://github.com/k2-fsa/sherpa-onnx/releases
- Extract the model files
- Place the model file as
app/src/main/assets/sherpa_tts/vits-model.onnx
- Place the lexicon file as
app/src/main/assets/sherpa_tts/lexicon.txt
Supported Features
- Convert any audio file to MP3 format
- Convert text to speech with natural voice and save as MP3
- Support for multiple languages (depending on the model used)
- Playback of converted audio files
- Efficient caching of generated audio files
Implementation Details
The MP3 conversion feature is implemented using the following components:
Mp3Converter.kt
: Main class for audio conversion operationsSherpaTtsWrapper.kt
: JNI wrapper for the Sherpa TTS librarysherpa_tts_jni.cpp
: Native C++ implementation for Sherpa TTSAudioConverterViewModel.kt
: ViewModel for the conversion UI