반응형

pyttsx3

*** https://medium.com/analytics-vidhya/easy-way-to-build-an-audiobook-using-python-20fc7d6fb1af

 

Easy Way To Build An Audiobook Using Python

An audiobook is nothing but a book that was recorded in an audio format. It can also be stated as a book that is being read aloud…

medium.com

 

pip install gTTS  https://pypi.org/project/gTTS/

 

https://pypi.org/project/pyttsx3/

 

pyttsx3

Text to Speech (TTS) library for Python 2 and 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.

pypi.org

Text to Speech (TTS) library for Python 2 and 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.

 

pip install pyttsx3

Project description

pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.

Installation

pip install pyttsx3

If you recieve errors such as No module named win32com.client, No module named win32, or No module named win32api, you will need to additionally install pypiwin32.

Usage :

import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()

Changing Voice , Rate and Volume :

import pyttsx3
engine = pyttsx3.init() # object creation

""" RATE"""
rate = engine.getProperty('rate')   # getting details of current speaking rate
print (rate)                        #printing current voice rate
engine.setProperty('rate', 125)     # setting up new voice rate


"""VOLUME"""
volume = engine.getProperty('volume')   #getting to know current volume level (min=0 and max=1)
print (volume)                          #printing current volume level
engine.setProperty('volume',1.0)    # setting up volume level  between 0 and 1

"""VOICE"""
voices = engine.getProperty('voices')       #getting details of current voice
#engine.setProperty('voice', voices[0].id)  #changing index, changes voices. o for male
engine.setProperty('voice', voices[1].id)   #changing index, changes voices. 1 for female

engine.say("Hello World!")
engine.say('My current speaking rate is ' + str(rate))
engine.runAndWait()
engine.stop()

"""Saving Voice to a file"""
# On linux make sure that 'espeak' and 'ffmpeg' are installed
engine.save_to_file('Hello World', 'test.mp3')
engine.runAndWait()

Full documentation of the Library

https://pyttsx3.readthedocs.io/en/latest/

Included TTS engines:

  • sapi5
  • nsss
  • espeak

Feel free to wrap another text-to-speech engine for use with pyttsx3.

반응형
반응형

Web Speech API  - TTS , not API 

https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API

 

Web Speech API - Web APIs | MDN

The Web Speech API enables you to incorporate voice data into web apps. The Web Speech API has two parts: SpeechSynthesis (Text-to-Speech), and SpeechRecognition (Asynchronous Speech Recognition.)

developer.mozilla.org

To run the demo, navigate to the live demo URL in a supporting mobile browser (such as Chrome).

 

 window.speechSynthesis.getVoices();

 

 

https://github.com/mdn/web-speech-api

반응형
반응형

CLOVA Speech Synthesis 및 CLOVA Premium Voice 서비스의 신규 이용신청 제한에 대한 사전 안내 (9/17)

 

 

www.ncloud.com/support/notice/all/944

 

NAVER CLOUD PLATFORM

cloud computing services for corporations, IaaS, PaaS, SaaS, with Global region and Security Technology Certification

www.ncloud.com

안녕하세요. 네이버 클라우드 플랫폼입니다.

 

CLOVA Voice 출시에 따라 기존의 CLOVA Speech Synthesis(CSS)/CLOVA Premium Voice(CPV) 서비스의 신규 이용신청이 2020년 9월 17일부터는 제한될 예정으로 사전 안내드립니다.

네이버 클라우드 플랫폼은 새롭게 개발된 목소리(Voicefont)를 폭넓게 제공하는 CLOVA Voice 서비스를 2020년 9월 17일에 출시예정에 있습니다.  

CLOVA Voice 서비스는 기존 CSS/CPV에서 제공 중인 목소리 외 신규 목소리 12종이 추가될 예정이며, 향후에도 새로운 목소리를 CLOVA Voice 서비스를 통해 확대/제공될 예정입니다.

이에 기존 고객분들 중 이미 생성하여 사용 중인 CSS/CPV 서비스 이용에는 당분간 영향이 없을 예정이나, 더 폭넓은 서비스를 제공하는 CLOVA Voice 서비스 사용을 권장드립니다.

 

 

※ 적용 일시

  - 2020년 9월 17일

 

※ 적용 대상

  - 네이버 클라우드 플랫폼 이용 고객

 

※ 주요 변경 사항

  - CLOVA Speech Synthesis(CSS), CLOVA Premium Voice(CPV) 서비스의 신규 신청 제한

    * 새로운 CLOVA Voice로 전환을 위해 CSS 및 CPV의 신규 서비스 신청은 제한됩니다.

    * 향후 새로운 목소리는 CLOVA Voice를 통해 확대 제공 예정입니다.

    * 이미 생성하여 사용 중인 CSS 및 CPV 서비스 이용에는 영향이 없습니다.​

 

관련 문의는 ' 고객지원 문의하기' 또는 1544-5876으로 문의해 주십시오. 

앞으로도 더 나은 서비스를 제공하기 위해 노력하겠습니다.

 

감사합니다.

 

네이버 클라우드 플랫폼 드림.

 

반응형

'프로그래밍' 카테고리의 다른 글

애플, 통합 구독 서비스 ‘애플 원’ 공개  (0) 2020.09.16
naver AI CSR  (0) 2020.09.11
알약 수동 업데이트  (0) 2020.09.07
웹어셈블리 - WebAssembly  (0) 2020.08.28
화상회의 - https://zoom.us/ 줌  (0) 2020.08.28
반응형


https://github.com/vilic/cordova-plugin-tts


 error issue :  https://forum.ionicframework.com/t/problems-with-text-to-speech/31927


Cordova Text-to-Speech Plugin

Platforms

iOS 7+
Windows Phone 8
Android 4.0.3+ (API Level 15+)

Installation

cordova plugin add cordova-plugin-tts

Usage

// make sure your the code gets executed only after `deviceready`.
document.addEventListener('deviceready', function () {
    // basic usage
    TTS
        .speak('hello, world!', function () {
            alert('success');
        }, function (reason) {
            alert(reason);
        });
    
    // or with more options
    TTS
        .speak({
            text: 'hello, world!',
            locale: 'en-GB',
            rate: 0.75
        }, function () {
            alert('success');
        }, function (reason) {
            alert(reason);
        });
}, false);

Tips: speak an empty string to interrupt.

반응형

+ Recent posts