def tts_voice_clip(voice_client, text): with(yield from tts_lock): tts = gTTS(text=text, lang='en') tts.save('data/tts.mp3') yield from voice_clip(voice_client, 'data/tts.mp3') os.remove('data/tts.mp3')