-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsound_gen.py
55 lines (49 loc) · 1.51 KB
/
sound_gen.py
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
import gtts
# commands = [
# "find the laptop",
# "show me the location of laptop",
# "spot the laptop",
# "locate the laptop",
# "where is laptop",
# "what is the location of my laptop",
# "find the bottle",
# "show me the location of bottle",
# "spot the bottle",
# "locate the bottle",
# "where is bottle",
# "what is the location of bottle",
# "find the mouse",
# "show me the location of mouse",
# "spot the mouse",
# "locate the mouse",
# "where is mouse",
# "what is the location of mouse",
# "find the monitor",
# "show me the location of monitor",
# "spot the monitor",
# "locate the monitor",
# "where is monitor",
# "what is the location of monitor",
# "find the keyboard",
# "show me the location of keyboard",
# "spot the keyboard",
# "locate the keyboard",
# "where is keyboard",
# "what is the location of keyboard"
# ]
commands = [
"can I know more about",
"describe",
"give me details of",
"i want details of",
"provide details of",
"what are details of",
]
objects = ["monitor", "keyboard", "laptop", "mouse", "bottle"]
for cmd in commands:
for obj in objects:
command = "%s %s" % (cmd, obj)
tts = gtts.gTTS(command)
tts.save(os.path.join("/home/darshanakg/speech_commands/new_describe", command.replace(" ", "_") + ".mp3"))
print(os.path.join("/home/darshanakg/speech_commands/new_describe", command.replace(" ", "_") + ".mp3"))