Beispiel #1
0
def first_time_checked():
    text = json.loads(r2.text)['name'] + "님 환영합니다."
    tts = gTTS(text=text, lang='ko')
    f = open(filename, 'wb')
    tts.write_to_fp(f)
    f.close()
    playsound(filename)
Beispiel #2
0
def  cria_audio ( áudio ):
	tts  =  gTTS ( áudio , lang = 'pt-br' )
	#Salva o arquivo de áudio
	tts . save ( 'audios / hello.mp3' )
	print ( "Estou aprendendo o que você disse ..." )
	#Da reproduzir ao áudio
	playsound ( 'audios / hello.mp3' )
def blue_say(audio_string):
    tts = gTTS(text = audio_string, lang='en')
    r = random.randint(1,10000000)
    audio_file = 'audio-' + str(r) + '.mp3'
    tts.save(audio_file)
    playsound.playsound(audio_file)
    print(audio_string)
    os.remove(audio_file)
Beispiel #4
0
def registration_mode():
    encoded_card_id = base64.b64encode(generated_id.encode('utf-8'))
    text = "등록되지 않은 카드입니다. 등록이 필요합니다."
    tts = gTTS(text=text, lang='ko')
    f = open(filename, 'wb')
    tts.write_to_fp(f)
    f.close()
    playsound(filename)
    registration.registration(encoded_card_id)
def event_convert(event):
    # Visual configurations
    processing_label = tk.Label(win, text = "Converting...")
    processing_label.place(x = 370, y = 130)
    processing_label.configure(background = 'light blue') 
    # Processes
    #print("%s" % (entry1.get()))
    textInput = input('%s' % (entry1.get()))
    textconv = gTTS(text = textInput, lang = 'en')
    textconv.save("text.mp3")
Beispiel #6
0
import os
import Tesseract
import gTTS

print(Tesseract.image_to_string(image.open()))
lang = "english"
spell = gTTS(lang=english, text=mytext, slow=True)
os.save("welcome.mp3")
os.system("mpg321 welcome.mp3")
Beispiel #7
0
import gTTS
import ffmpeg  #pip install ffmpeg-python

quote = 'mp3 to wav'

file = 'quote.mp3'

tts = gTTS(text=quote, lang='en')
tts.save(file)

sound = AudioSegment.from_mp3(file)
sound.export("quote", format="wav")

wavFile = ffmpeg.input('file').filter().output('file.wav').run()
fro gtts import gTTS


# In[3]:


fro gtts import gTTS
import OS

fh = open("textfile.txt","r")
myText = fh.read().replace("\n"," ")

language = 'en'

output = gTTS(text=myText, lang=language,slow=False)

output.save("output.mp3")
fh.close()
os.system("start output.mp3")


# In[5]:


from gtts import gTTS
import OS

fh = open("textfile.txt","r")
myText = fh.read().replace("\n"," ")
import vlc
import time
import gTTS

text = "Text to speech conversion"
mp2file = gTTS(text=text, lang='en', slow=False)
mp3file.save("textToSpeech.mp3")

sound = vlc.MediaPlayer("textToSpeech.mp3")
sound.play()

time.sleep(10)
Beispiel #10
0
import gTTS
from gtts import gTTS
import os
tts = gTTS(text='namstey, India', lang='hi', slow=True)

tts.save("namstey.mp3")

os.system("mpg321 namstey.mp3")
import gTTS
import os

a="Text to speech convertor using python"
language= 'en'
output=gTTS(text=a,lang=language,slow=False)

output.save("output.mp3");

os.system("start output.mp3")