navalnica / VoicedCalculator

Simple calculator app with voiced commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Voiced calculator ๐Ÿงฎ๐Ÿ”Š

Simple calculator with voiced commands.

program example

Description

Based on hiamandeep/tkcalc repository.

Written in python using tkinter and winsound standard libraries.

Calculator voices each arithmetic operation, input digit and result of calculations. It plays separate audio files from voice folder that correspond to each digit and operation.

How to run

  • Download the code

  • Put your own voice .wav files under voice folder.
    1 file per 1 command / digit
    e.g.: 0.wav 1.wav, 2.wav, ..., multiply.wav, calculate.wav

  • Calculator is voiced with belarusian language.
    In order to use it for other language you will also have to change filenames that are used in calculator.py.

  • Launch main script: python calculator.py

Known issues:

  • eval is used instead of implementing own Reverse Polish Notation
    Yes, you can inject your own malicious code ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿฑโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป

  • For simplicity with using eval, interger division is implemented instead of calculating percent (% operation)

  • Calculation result is shown only after it is voiced. Need to first show the result and voice it afterwards.

  • If result of floating point operation is integer, it is still displayed as float (e.g. 42.0)

  • Layout is small and not beautiful. it was designed to be as simple and as fast to develop as possible :)

About

Simple calculator app with voiced commands


Languages

Language:Python 100.0%