Skip to main content
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.

Metadata

Release files for ttastromech 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ttastromech 0.6.1
File Size Uploaded
ttastromech-0.6.1.tar.gz 308.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ttastromech 0.6.1
File Interpreter ABI Platform
ttastromech-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 621.7 kB

Release files / ttastromech-0.6.1.tar.gz

Download URL ttastromech-0.6.1.tar.gz
Size 308.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e20707144812d811d86e8b388479c2c97a19f61327e1ad5422932ae747749a61
BLAKE2b-256 checksum
How to use checksums
0ddb79253fca383a5b5c3139c9fa4a361a4e1a027100fa2975823b3d61dbcf37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

Release files / ttastromech-0.6.1-py3-none-any.whl

Download URL ttastromech-0.6.1-py3-none-any.whl
Size 313.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
226ebce7be3c24f75e7dbee14447c0a4401354fe86357a8923e4b32a9184402b
BLAKE2b-256 checksum
How to use checksums
20c2f2c8ff016ed7a3753047e58fb1e9117c1e74bc803ad3d99846ce23a524a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.3.1

3 release files

0.2.0

3 release files

0.1.0

3 release files

0.0.4

3 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page