2025-04-03 11:02:12 +03:00
2025-04-03 11:02:12 +03:00
2025-04-03 11:02:12 +03:00

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

  1. Basic Usage

    • Enter text in the input field
    • Press "Speak" to hear the text
    • Toggle dark mode using the switch
  2. Language Settings

    • Press "TTS Settings" to configure TTS
    • The app uses your system's TTS settings
    • Language changes take effect immediately
  3. Sharing Text

    • Share text from any app to Voca
    • The app will automatically load the shared text
    • Press "Speak" to hear the shared text
  4. 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:

  1. Copy the template file to create your keystore properties file:

    cp keystore.properties.template keystore.properties
    
  2. 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
    
  3. 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

  1. Run the prepare-release script with the new version:

    ./scripts/prepare-release.sh 0.0.7
    
  2. Update the generated release notes in release_notes.md

  3. Commit and push your changes:

    git add .
    git commit -m "chore: prepare release v0.0.7"
    git push origin main
    
  4. 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:

  1. AndroidLame: For converting audio files or PCM audio data to MP3 format.
  2. 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:

  1. Download a Sherpa TTS model package from https://github.com/k2-fsa/sherpa-onnx/releases
  2. Extract the model files
  3. Place the model file as app/src/main/assets/sherpa_tts/vits-model.onnx
  4. 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 operations
  • SherpaTtsWrapper.kt: JNI wrapper for the Sherpa TTS library
  • sherpa_tts_jni.cpp: Native C++ implementation for Sherpa TTS
  • AudioConverterViewModel.kt: ViewModel for the conversion UI
Description
No description provided
Readme 40 MiB
2025-04-10 11:05:35 +00:00
Languages
Kotlin 99%
Shell 1%