Skip to main content

With this package you can create programs which can speak to you and recognize your voice adn run commands. (easy eg.: You can create J.A.R.V.I.S from Iron Man :))

Project description

Voice Communication

With this package you can create programs which can speak to you and recognize your voice adn run commands. (easy eg.: You can create J.A.R.V.I.S from Iron Man :))

Supported language is python 3. (Package wrote in 3.9.6)

Installation

Use this command:

pip install voice-comm

Change Log

0.0.3 (06/09/2021)

  • Added modules option | Load modules / Stop modules
  • Fixing some issue

Help

Help:

import voice_comm

voice = voice_comm.VoiceComm(language="en-EN") # Here you can specify rate, volume, voice (this voice is choose from voice tokens [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens])

voice.load_modules("test")

@voice.add_command(or_required_words=["hi", "hello"], words=["Da4ndo"]) #Here you can specify is_capital_letters_matter [default: False], required_words, words and or_required_words (or_required_words is very similar to required_words but if its contaion more, its don't require all words, just one)
def hello():
    voice.say("Hello word!")

text = voice.recognize() # Here you can specify phrase_time_limit, timeout, snowboy_configuration. Advanced: only ``phrase_time_limit`` and value ``5``

voice.recognize_command(text) # hello function will call if you say ``hello`` or ``hi``

How to load module:

# File name ``test.py`` | Can be modified.

import datetime

class Mod():
    def __init__(self, engine):
        self.engine = engine
    
    def run(self):
        @self.engine.add_command(is_capital_letters_matter=True, words=["Microsoft"])
        def test(text):
            print(text)
            self.engine.say("Test sikeres!")

        @self.engine.add_command(or_required_words=["idő", "óra"], words=["hány", "mennyi"])
        def time():
            time = str(datetime.datetime.now().replace(microsecond=0)).replace("-", ".")
            print(f"[RESPOND] {time}")
            self.engine.say(time)
    
def setup(engine):
    Mod(engine).run()

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

voice_comm-0.0.3.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file voice_comm-0.0.3.tar.gz.

File metadata

  • Download URL: voice_comm-0.0.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.6

File hashes

Hashes for voice_comm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 66bcce443c0c8c63bf949e951bd0d3fe049327ea750c676683b1e8ea3b55fca5
MD5 93e9e6fadcc9f96916b4dd6dd7fc38a5
BLAKE2b-256 b7752ba65e278162820d10fbfb8fa73ccacf83353b660750cf49dcd998a3e1fb

See more details on using hashes here.

Supported by

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