tts_google: Convert Text into Speech

Description Usage Arguments Details Note Author(s) Examples

Description

Please note that this function is deprecated and requests will be fulfilled with function "tts_ITRI".

Usage

1
tts_google(content, destfile = tempfile("Rtts", fileext = ".mp3"))

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

Examples

1
2
3
  # Used default value for destfile argument, 
  # so the generated voice file will be saved in the working directory.
  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, 3:45 p.m.

Related to tts_google in Rtts...