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

Uploaded Source

Built Distribution

ttastromech-0.6.0-py3-none-any.whl (312.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ttastromech-0.6.0.tar.gz
  • Upload date:
  • Size: 308.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.5 Darwin/21.3.0

File hashes

Hashes for ttastromech-0.6.0.tar.gz
Algorithm Hash digest
SHA256 560a5c8062d64042b3efd691d3fc47515019ce51819531330e306d1a1fb9df6e
MD5 ff9c120120d3a6855a8fea124f6e9a07
BLAKE2b-256 5d47c23eb012d2eba0f2fc0911d8a4232660039ac687f534c7a9fd1a460dbd45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ttastromech-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 312.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.5 Darwin/21.3.0

File hashes

Hashes for ttastromech-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c75ed0235b00a5c50242b856c02581ae2d3eb041750a54222ebbe13a3b0423
MD5 78da3bccb4a7bae50b3bcb87f347cf9b
BLAKE2b-256 6a3b9ab9396122cce3ea1da6774669a23a2b57427b8a95b14a5b77dc60f976da

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