Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os #import to give espeak command
- import Configure #import just to get the channel definition '##wzgm'
- import string #import to string manipulate
- #espeak script
- class Espeak_Voices():
- def __init__(self,message):#message = buffer = IRC.recv(1024) irc output
- msg = string.split(message)
- nick_name = msg[0][:string.find(msg[0],"!")]
- channel = msg[1]
- nick = (string.lstrip(nick_name, ':'))
- message = ' '.join(msg[3:])
- print message
- if msg [1] == 'PRIVMSG' and string.lstrip(msg[2], ':') == Configure.Channel:#channel ##wzgm but thats in the configure pie file
- said = 'espeak -s 20 "' + nick + ' said,, ' + message.replace(':','') + '"'
- print said
- os.system(said)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement