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.4 (10/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.4.tar.gz (5.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: voice_comm-0.0.4.tar.gz
  • Upload date:
  • Size: 5.3 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.4.tar.gz
Algorithm Hash digest
SHA256 32ba8d00181816fd6974a023069c105d28a4e77d7599559c907829b0dbddc025
MD5 c070d42a7d09d9065205679665e2c935
BLAKE2b-256 74e23dbad1e26071c8c11f1c3c981783805365bc9fabd28c16b40b9a9b477f29

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