Skip to content

Instantly share code, notes, and snippets.

@alexcusack
Created November 25, 2015 18:10
Show Gist options
  • Save alexcusack/53e72889fc56747a2992 to your computer and use it in GitHub Desktop.
Save alexcusack/53e72889fc56747a2992 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
SERVER_IP_ADDRESS='10.146.115.109'
from two1.commands.config import Config
from two1.lib.wallet import Wallet
from two1.lib.bitrequests import BitTransferRequests
username = Config().username
wallet = Wallet()
requests = BitTransferRequests(wallet, username)
def send_text(text):
print('You sent {0}'.format(text))
# 402 endpoint URL and request
tts_url = 'http://' + SERVER_IP_ADDRESS + ':5000/tts?text={0}'
requests.get(url=tts_url.format(text))
if __name__ == '__main__':
from sys import argv
send_text(argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment