티스토리 뷰

반응형

 

[진행 조건]

-파이썬(python) 3버전 설치

https://gofogo.tistory.com/7

 

-pip 설치

https://gofogo.tistory.com/8

 

-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 #텍스트 #음성 #파이썬

 

반응형
댓글
반응형