Isoqjanov Ilyos | Python
pyttsx3 si ieltsga tayyorlanayotgan yoki ingliz tili o'rganayotganlarga juda foydali ekan.
To'g'ri u o'zbekchani uncha o'qiy olmaydi, lekin ingliz tilini yaxshi o'qiydi va .mp3 faylga yozib beradi. Siz esa bu mp3 faylni telefonda eshitib yurishingiz mumkin.
import pyttsx3
# Init TTS engine
engine = pyttsx3.init()
engine.setProperty('rate', 150) # speaking speed
engine.setProperty('volume', 1) # volume 0-1
phrases = [
"Turn left. Turn left at the corner.",
"Turn right. Turn right after the traffic lights.",
"Go straight. Go straight along this road.",
"Follow the road. Follow the road until you reach the park.",
"Cross the street. Cross the street at the zebra crossing.",
"Next to. The library is next to the post office.",
"Opposite. The bank is opposite the park.",
"Between. The school is between the supermarket and the cafe.",
"Near. There is a bus stop near the station.",
"Adjacent to. The new building is adjacent to the river.",
"Has been built. A new shopping mall has been built.",
"Has been removed. The old bridge has been removed.",
"Has been extended. The park has been extended.",
"Has been converted. The factory has been converted into apartments.",
"Has been relocated. The bus stop has been relocated."
]
# Combine phrases into one string
text = " ".join(phrases)
# Save to MP3
engine.save_to_file(text, 'IELTS_map_phrases.mp3')
engine.runAndWait()
10 · 1.1K ·