Skip to main content

python library transform text strings into Astromech (like R2D2) sounds

Project description

https://raw.githubusercontent.com/MomsFriendlyRobotCompany/ttastromech/master/docs/pics/r2.gif

Text to Astromech

https://img.shields.io/pypi/l/ttastromech.svg https://img.shields.io/pypi/pyversions/ttastromech.svg https://img.shields.io/pypi/wheel/ttastromech.svg https://img.shields.io/pypi/v/ttastromech.svg

This was originally created by Hugo SCHOCH. I just packaged it on pypi and use it for an R2D2 project I am working on.

It works by assigning an R2-D2 sound to each letter of the alphabet, then, when you pass it a string, it makes sounds like an astromech. Currently it only supports Linux and macOS.

OS

Audio Program

macOS

afplay

linux

play from libsox

linux

aplay from alsa

Install

The preferred method of installation is:

pip install ttastromech

Usage

from ttastromech import TTAstromech
import time


if __name__ == '__main__':
        r2 = TTAstromech()

        try:
                r2.run()  # make random astromech sounds by feeding it random strings of letters
                time.sleep(2)
        except KeyboardInterrupt:
                print('bye ...')

Or:

astromech.py "my god, its full of stars ... oh wait, the wrong movie"

MIT License

Copyright (c) 2015 SCHOCH Hugo

Copyright (c) 2017 Kevin J. Walchko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

ttastromech-0.6.1.tar.gz (308.5 kB view details)

Uploaded Source

Built Distribution

ttastromech-0.6.1-py3-none-any.whl (313.2 kB view details)

Uploaded Python 3

File details

Details for the file ttastromech-0.6.1.tar.gz.

File metadata

  • Download URL: ttastromech-0.6.1.tar.gz
  • Upload date:
  • Size: 308.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for ttastromech-0.6.1.tar.gz
Algorithm Hash digest
SHA256 e20707144812d811d86e8b388479c2c97a19f61327e1ad5422932ae747749a61
MD5 92a884a0a1b75c861553f3e887170bc6
BLAKE2b-256 0ddb79253fca383a5b5c3139c9fa4a361a4e1a027100fa2975823b3d61dbcf37

See more details on using hashes here.

File details

Details for the file ttastromech-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: ttastromech-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 313.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for ttastromech-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 226ebce7be3c24f75e7dbee14447c0a4401354fe86357a8923e4b32a9184402b
MD5 3051a4dd1a52ddad348244cb6237e0bc
BLAKE2b-256 20c2f2c8ff016ed7a3753047e58fb1e9117c1e74bc803ad3d99846ce23a524a2

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