Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed file to talk.py

  • Loading branch information...
commit f2eb218d9ecf96856382a708e0e827af6d7d8cc7 1 parent dce670f
@fs111 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/{silentguy.py → talk.py}
View
10 src/silentguy.py → src/talk.py
@@ -1,17 +1,19 @@
# -*- coding: utf-8 -*-
from subprocess import Popen, PIPE
-p = Popen(["espeak -s 40 -p 99 -v en "], shell=True,
- stdin=PIPE, stdout=PIPE, close_fds=True)
-
COMMAND = ".talk"
+process = Popen(["espeak -s 40 -p 99 -v en "], shell=True,
+ stdin=PIPE, stdout=PIPE, close_fds=True)
+
def sayitoutloud(what):
- p.stdin.write(what + "\n")
+ """writes the text to the stdin of the espeak process"""
+ process.stdin.write(what + "\n")
def talk(phenny, input):
+ """Callback that phenny calls when somone issues the .talk command"""
input = input.replace(COMMAND, "")
sayitoutloud(input)

0 comments on commit f2eb218

Please sign in to comment.
Something went wrong with that request. Please try again.