from gtts import gTTS
import os
import subprocess
tts = gTTS(text='Hello World', lang='en') //TEXT TO SPEECH
tts.save("audio.mp3") //Hello world will be saved in audio.mp3
os.system("mpg321 audio.mp3") <-- I want to play the audio file in python(not to call any other music player)
mp3ファイルを再生しますが、何もhappnes(cmdが起動し、1秒で消える)Pythonの私がaudio.mp3ファイルを再生したい
コマンド名はmp321ではなくmpg123です。 Linux上にのみ存在します。 –