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 if you’re on XP, you’ll need 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.2.tar.gz (18.3 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Source

File details

Details for the file speech-0.5.2.tar.gz.

File metadata

  • Download URL: speech-0.5.2.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for speech-0.5.2.tar.gz
Algorithm Hash digest
SHA256 62d2a714d4c6e971809c7ec902df294ded956ce4a9f6a908cf9cc705bab9f7a7
MD5 7508fc13841c606b5427cb9d494f7bda
BLAKE2b-256 0fab12dbcc8ad860546b7aaef6c367ffa639cc81007540e488eb92cf22639f86

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for speech-0.5.2-py2.5.egg
Algorithm Hash digest
SHA256 1636329b2d0699cd09954d3c40cd9f71ab707e9d91134caba525ebd4b0b74038
MD5 c3e084b43727f57724211adf1f610867
BLAKE2b-256 ffb29940ae2f70094ba3e6d202654de2cc148479067427430bb7d7aa9a6beee8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for speech-0.5.2-py2.4.egg
Algorithm Hash digest
SHA256 a04ca718c1535b5727b50999b2683cc76b91677f9fea14601805d033ecdf26d8
MD5 29ecaf4f0d2cb9f87dc4af57abacece4
BLAKE2b-256 7e8a8c5a3f81585c63e255db17133ce74dc6a2d2d2a3af3ec1768eda790ba0c0

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