Skip to main content

A voice assistant for Termux written in python using Termux Api

Project description

termux-sriparna

logo

A voice assistant for Termux written in python using Termux Api

With sriparna you can:

  1. Call any number ✅
  2. Check battery status ✅
  3. Send messages ❌
  4. Open any app ✅
  5. Check whether ✅
  6. See current date and time ✅
  7. See live location (with google maps link) ❌
  8. Read call logs ❌ (Deprecated)
  9. Perform any search ✅
  10. Turn Flash on/off ✅

More features coming...

Note: This is a voice assistant and not to be used as a chatbot !

If you like the project, don't forget to leave a star ⭐ to the repository. It motivates me to keep continue the project.

PR's are welcomed !! Report Bugs(if any)

Requirements:

Termux

Termux-Api

Termux-Widget (Optional: For shortcut application)

Note: Download these apps from the following official links only.

Do not use playstore version !!

Please grant all permission to Termux-api and disable battery optimisation for the app beforehand.

Installation:

Install using pypi
pkg update && pkg upgrade -y
pkg install python -y
pip install -Uv termux-sriparna

After using the above commands you can type sriparna or sriparna-gui to run the voice assistant.

or
  1. Clone the GitHub repository:
git clone https://github.com/ayusc/termux-sriparna
  1. Navigate to the project directory:
cd termux-sriparna
  1. Run the setup script
bash setup.sh
  1. Run the voice assistant:
python sriparna/sriparna.py 

For terminal version

or

python sriparna/sriparna.py 

For gui version

Commands

Each command is assisted with a pattern type:

To call any number you can say "hey sriparna call XXXXXXXXXX"

You can also include country code in your query "hey sriparna call plus(country code)******" it will read the number as "+(country code)number"

Besides you can call a number from your contact list just say "sriparna call ayus", "please call ayus2" etc...

Note: In certain cases the speech recognition may not correctly identify the contact name. In such case it's better to spell the letters in the name individually. For example "sriparna please call a y u s", "call a y u s 2" etc...

To check battery you can say "sriparna how much is my battery", "tell my battery percentage", "hello what is my battery status", "tell my battery health"
To open any application you can say "open whatsapp", "sriparna please open youtube" etc...

You can open chrome, gmail, youtube and whatsapp with this, if you want more applications you need to specify their package names and class name in app.json

You can use Shortcut Maker to find package name and class names of installed applications.

For pypi installation: You can directly edit the apps.json file with vi /data/data/com.termux/files/usr/lib/python$(python -c 'import sys; print(sys.version_info[0])').$(python -c 'import sys; print(sys.version_info[1])')/site-packages/sriparna/apps.json

To check the current weather conditions you can "hi sriparna whats the weather alike", "tell me the weather forecast", "what is the current weather condition", "how is the weather today"
To turn on flashlight you can say "hey please turn on the flash/torch", "flash/torch on", similarly you can say "hey please turn off the flash/torch", "flash/torch off" to turn it off.
To know current date and time you can say "what is(or what's) the time", "what is today's date", "what date is today"

Credits

xtekky for g4f

Slash Mark IT for the project idea.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termux-sriparna-1.1.0.tar.gz (1.0 MB view details)

Uploaded Source

File details

Details for the file termux-sriparna-1.1.0.tar.gz.

File metadata

  • Download URL: termux-sriparna-1.1.0.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for termux-sriparna-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5e6d33b87151a71a98051f9255fa3777dcef49e98e44421914d909ce6f9e6a1b
MD5 50958a1ecb6bf13eba9cbd9ae0300de2
BLAKE2b-256 ad1f03b00e3d8df4f1637bc0bad2765beb6655fc980c683f754060b36ebdbde9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page