Skip to main content

A clean interface to Windows speech recognition and text-to-speech capabilities.

Project description

Allows your Windows python program to:
  • get the text spoken by the user when prompted (a la raw_input())

  • execute a callback when certain phrases are heard

  • execute a callback when any understandable text is heard

  • have different callbacks for different groups of phrases

  • convert text to speech.

Example

Showing speaking out loud, a simple input, and listening for all recognizable words.

import speech
import time

response = speech.input("Say something, please.")
speech.say("You said " + response)

def callback(phrase, listener):
    if phrase == "goodbye":
        listener.stoplistening()
    speech.say(phrase)

listener = speech.listenforanything(callback)
while listener.islistening():
    time.sleep(.5)

Requirements

Requires Windows XP or Vista, and Python 2.4 or 2.5. If you use Windows Vista, you’ll need to say “start listening” if Speech Recognition is not awake.

In addition to easy_installing speech.py, you’ll need pywin32 (for Python 2.5 or for Python 2.4) and the Microsoft Speech kit (installer here).

Resources

Please let me know if you like or use this module - it would make my day!

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

speech-0.5.1.zip (30.1 kB view details)

Uploaded Source

Built Distributions

speech-0.5.1-py2.5.egg (8.8 kB view details)

Uploaded Source

speech-0.5.1-py2.4.egg (8.9 kB view details)

Uploaded Source

File details

Details for the file speech-0.5.1.zip.

File metadata

  • Download URL: speech-0.5.1.zip
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for speech-0.5.1.zip
Algorithm Hash digest
SHA256 0623145e784d6d869ccd4a3c59c6163d8250a7cdbf2d6dfe6d88d9c4767bbd06
MD5 8825c3c57ac7e278b5aa8b662383a313
BLAKE2b-256 da474e14b0b2e2bbf8b845a4e7a5322f3cc41be3c24ded4764e7f30747db7f73

See more details on using hashes here.

File details

Details for the file speech-0.5.1-py2.5.egg.

File metadata

  • Download URL: speech-0.5.1-py2.5.egg
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for speech-0.5.1-py2.5.egg
Algorithm Hash digest
SHA256 57a6228938d9dbf5480dd285acd4f8c3a169f71e63527995b437101a88e77960
MD5 24a05e9321a6bd0f3a866f2f55814cd8
BLAKE2b-256 8ab5c897f0c4d53dfec4d5c41917ad653544a6c442889edacf8a8307125e023f

See more details on using hashes here.

File details

Details for the file speech-0.5.1-py2.4.egg.

File metadata

  • Download URL: speech-0.5.1-py2.4.egg
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for speech-0.5.1-py2.4.egg
Algorithm Hash digest
SHA256 46bb1827fcb3c689b2eb8b96e9c7a69f55bf91f80943f81056c429693266b9da
MD5 3e51518afd88b4803a2cebb8303a34c8
BLAKE2b-256 555de233be9dd1375820dd6484090eb177f04b9f5b415ab66fc52d1b877625ae

See more details on using hashes here.

Supported by

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