tts_google: Convert Text into Speech

Description Usage Arguments Details Note Author(s) References Examples

View source: R/tts_google.R

Description

Convert text into speech (voice files in .mp3 format) using the API offered by Google Translate (https://translate.google.com). Only English is supported currently.

Usage

1
tts_google(content = "hello world", destfile = paste(getwd(),"r.mp3",sep="/"))

Arguments

content

The content to convert into speech. In string format.

destfile

where to save the voice file generated and the voice file name. Default path is the current working path.

Details

Convert text into speech (voice files in .mp3 format) using the API offered by Google Translate. No extra software or platform support is required to use this function.

Note

[1] This function can only help convert restricted-length text (roughly nchar(text)<=100); [2] Try to use only comma and period for separation.

Author(s)

Xiaodong Deng

References

https://translate.google.com

Examples

1
  tts_google("Hello.")

Example output

Loading required package: RCurl
Loading required package: bitops

 The server is responding slowly. Please try again later.NULL
Warning message:
function 'tts_google' is deprecated due to API issue. Please use 'tts_ITIR' instead.
(Your request was done with 'tts_ITRI' this time) 

Rtts documentation built on May 2, 2019, 5:26 p.m.

Related to tts_google in Rtts...