Using text to speech using Terminal + Python in Mac OS X
This post helps you to use 'say' command in python
using 'say' command in python
__author__ = 'vijay'
# Run in Mac OS X
import os
import time
lyrics1 = " we were meant to be" \
"like a destiny" \
"can you fill it our baby baby " \
"When you next to me " \
"I can never see " \
"anyone else but you baby "
lyrics2 = " coz gonna believe that" \
"you sat them next to me " \
"yesterday I was facebook talking you" \
"now u sitting face to face with me" \
"simple close i just dont what to do"
lyrics3 = " if you if you come to me baby i swear am gonna make you happy no no dont" \
" you worry you know that am ready ready You are you are my ice cream lady " \
"chocolate venila strawberry baby " \
"if you get a minute bebe IM me facebook whatsapp just contact me " \
" coz am ready for you baby come n get it, come n get it"
# List of voice options available in Say command
Female_Voices = ['Agnes', 'Kathy', 'Princess', 'Vicki', 'Victoria']
Male_Voices = ['Alex', 'Bruce', 'Fred', 'Junior', 'Ralph']
Novelty_Voices = ['Albert', 'Bad News', 'Bahh', 'Bells', 'Boing', 'Bubbles',
'Cellos', 'Deranged', 'Good News', 'Hysterical', 'Pipe Organ',
'Trinoids', 'Whisper', 'Zarvox']
all_voices = Female_Voices + Male_Voices + Novelty_Voices
for voice in all_voices:
time.sleep(1)
print "Voice is "+voice
os.system("say -v "+voice+" Hey Hi this is "+voice+" Annd I gonna sing a song for you Baby ")
Comments
Post a Comment