Skip to content
Snippets Groups Projects
Commit f7bdda7f authored by 최정민's avatar 최정민
Browse files

Added numberToSpeech

parent 6216d0f6
No related branches found
No related tags found
No related merge requests found
from .numberToSpeech import numberToSpeech
\ No newline at end of file
import pyttsx3
class NumberToSpeech:
mapping=['young','eel','ee','sam','sa','oh','yook','chil','pal','gu']
def __init__(self):
self.engine = pyttsx3.init()
def say(self, number):
result = ''
number = str(number)
for num in number:
num = int(num)
result += self.mapping[num]+' '
result += "meter"
self.engine.say(result)
self.engine.runAndWait()
if __name__ == "__main__":
speech = NumberToSpeech()
speech.say(1234567890)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment