Система не может найти файл mp3, потому что python изменил предложение в пути.
from responsive_voice.voices import TurkishMale
import playsound
import os
engine = TurkishMale()
sentence = "Merhaba, ben elın nasıl yardımcı olabilirim"
file = sentence + ".mp3"
path = "C:\\Users\\**\\Documents\\ST\\indirilenler\\" + file
if not os.path.exists(file):
engine.get_mp3(sentence, mp3_file= path)
playsound.playsound(path)
else:
playsound.playsound(path)
Ошибка:
open "C:\Users\**\Documents\ST\indirilenler\Merhaba, ben el\u0131n nas\u0131l yard\u0131mc\u0131 olabilirim.mp3" alias playsound_0.6485166808160175
Cannot find this file. Verify the path and file name are correct.