| pcm_to_wav | R Documentation | 
Accepts PCM audio data as input and generates a corresponding WAV file
pcm_to_wav(
  input,
  output = tempfile(fileext = ".wav"),
  sample_rate = 16000,
  extensible = FALSE
)
| input | output from 'get_synthesis“ from  | 
| output | output file for Wav file | 
| sample_rate | Sampling rate for tuneR::Wave | 
| extensible | passed to tuneR::writeWave | 
A filename of the output
## Not run: 
fname = system.file("extdata", "pcm_file.wav", package = "text2speech")
res = pcm_to_wav(fname)
testthat::expect_error(tuneR::readWave(fname))
testthat::expect_is(tuneR::readWave(res), "Wave")
## End(Not run)
## Not run: 
if (requireNamespace("aws.polly", quietly = TRUE)) {
text = "hey, ho, let's go!"
if (tts_amazon_auth()) {
   res = tts_amazon(text, output_format = "wav")
}
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.