Skip to main content

Send commands to Links from within your Python scripts.

Project description

Interface with your Links AI and send commands from within your Python scripts. Most of Links built in functions can be accessed by name with more being added all the time. If you have any requests feel free to let me know on github under issues. You can report bugs there as well. Have fun! Thanks!

Changelog at bottom of page under Updates

Links: ( Free Windows AI Software ) http://mega-voice-command.com/

Installation

Simple:

install LINKS ( http://mega-voice-command.com/ )

pip install pytronlinks –upgrade

Full command list

Example

import pytronlinks

ai = pytronlinks.Client()

  """
  Optional client parameters-

    port: Port that links is listening on
    key: Links web key
    ip: ip of computer with links
    path: If you installed links in a different location,
                 point this to the Scripts folder( MUST BE RAW ) ie: (r'PATH')

  ex: ai = pytronlinks.Client(path='C:\\temp', ip='192.0.0.16', key='KEY123')
  """

Run custom action command

Anything you can put in Links Action bar, you can put in here! See example.
import pytronlinks


ai = pytronlinks.Client()

ai.custom(r'[Set("Last Subject", "pytron is the coolest")]')
ai.custom(r'[Speak("[Get("Last Subject")]")]')

Put script into listen mode

import pytronlinks
"""
        **Make a command in links social tab like this**
     Command: Links {speech=test_dictation}
     Response: [Set("Pytron", {speech})]
     Profile: Main

     And use the dictation in Pytron with the script below.. ( Ctrl-c to quit )
"""

import pytronlinks

ai = pytronlinks.Client()

def main():
    dictation = ai.listen()
    if dictation:
        # ( do something with dictation )
        ai.talk(dictation)
        return

try:
    while True:
        main()
except KeyboardInterrupt:
    pass

Loquendo Function

Sends a ‘Loquendo by Nuance’ speech command ( requires Nuance Loquendo voices )

param text:Text to be spoken ( with all the syntax they use, better make it raw, ie: r’text’ )
param volume:Volume 0 - 100
param rate:Rate of speech 0 - 100 ( 50 is default )
param ai_name:Name of tts Voice ( case sensitive )

Example:

import pytronlinks

ai = pytronlinks.Client()
ai.LoqSpeak("I am an example","100","50","Simon")]

Updates

New features!

Changelog- v.0.3.5 - Fixed Listen() function - Added more functions ( No docstrings yet, tsk tsk traBpUkciP)

Changelog- v.0.3.3
  • PEP-8
  • Added rest of Docstrings
  • Created documentation using Sphinx
Changelog- v.0.3.2
  • Better error response handling in _get_request() ( uses ast standard library module )
  • Optimized _get_xml() & _clear_xml() ( Thanks Zunair )
  • Fixed Get() function ( typo in url )
Changelog- v.0.3.1
  • Added XML support for access to Links UserVariables.xml file
  • Added more function wrappers - [Get(“”)], [Set(“”, “”)]
Changelog- v.0.2.1
  • Added APPDATA as default path to LINKS Install ( ai = pytronlinks.Client() )
  • Added ‘Loquendo by Nuance’ function wrapper
  • Added a bunch of other LINKS function as well ( check the README )
  • Adding get json response verification ( Adding type of response as parameter )
  • Added custom function parser

Authors

traBpUkciP / https://github.com/Duroktar/

Download files

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

Files for pytronlinks, version 0.3.5
Filename, size File type Python version Upload date Hashes
Filename, size pytronlinks-0.3.5-py2.py3-none-any.whl (12.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pytronlinks-0.3.5.zip (16.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page