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

Uploaded Source

File details

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

File metadata

  • Download URL: voice_comm-0.0.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for voice_comm-0.0.5.tar.gz
Algorithm Hash digest
SHA256 263999aae7ebb3c02ce6d8ba333275c95b3c6a9a84f3afde5850743998cc52b4
MD5 87e711096824f11d418e9b279475c122
BLAKE2b-256 bb7c028e6f7b3c8d4630c5907553632d838aa299e47ba4c2424f591e9b354b9e

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