blob: b0b53b4a24de16f310400bf70fdcd56f502d0da9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/usr/bin/python
import elephant
from subprocess import Popen
def main():
words = elephant.word_list()
word_list = words.get_word_list()
print 'Lista de palabras'
print word_list
print 'Cantidad de palabras %s' %words.number_of_words
print ' '
print 'path de imagenes'
for word in word_list:
print words.get_word_image_path(word)
print ' '
from random import choice
word = choice(word_list)
path = words.get_word_image_path(word)
print 'Palabra aleatoria %s y el path correspndiente %s' %(word, path)
choice_letter = elephant.letters()
letter_to_say = 'Donde esta la letra '
letter_to_say += choice_letter.get_letter(word)
print letter_to_say
say(letter_to_say)
def say(text):
Popen(['espeak', '-v', 'es', text])
if __name__ == "__main__":
main()
|