파이썬(python)
[1분 해결] 파이썬(python)에서 pyttsx3활용하여 tts 구현하기
개발자 고포고
2021. 11. 1. 16:31
반응형
[진행 조건]
-파이썬(python) 3버전 설치
-pip 설치
-git 설치
추 후 업데이트 예정
[설치]
pip install pyttsx3
[현재폴더에서] git clone https://github.com/nateshmbhat/pyttsx3.git .
sample.py 생성
[코드구현]
import pyttsx3
engine = pyttsx3.init()
engine.setProperty('rate', 200)
engine.say('무궁화 꽃이 피었습니다')
engine.runAndWait()
import pyttsx3
- 패키지 설치
engine = pyttsx3.init()
- 라이브러리 초기화
engine.setProperty('rate', 200)
-'rate' 옵션 : 분당 말하기 속도(default:200)
engine.say('무궁화 꽃이 피었습니다')
-tts 진행할 문장
engine.runAndWait()
-동기화 실행
[tag]
#pip #python #pyttsx3 #text to speak #text to speech #tts #텍스트 #음성 #파이썬
반응형