function textToSsml(inputFile) {
    let rawLines = '';
    // Read input file
    try {
      rawLines = fs.readFileSync(inputFile, 'utf8');
    } catch (e) {
      console.log('Error:', e.stack);
      return;
    }

    // Replace special characters with HTML Ampersand Character Codes
    // These codes prevent the API from confusing text with SSML tags
    // For example, '<' --> '&lt;' and '&' --> '&amp;'
    let escapedLines = rawLines;
    escapedLines = escapedLines.replace(/&/g, '&amp;');
    escapedLines = escapedLines.replace(/"/g, '&quot;');
    escapedLines = escapedLines.replace(/</g, '&lt;');
    escapedLines = escapedLines.replace(/>/g, '&gt;');

    // Convert plaintext to SSML
    // Tag SSML so that there is a 2 second pause between each address
    const expandedNewline = escapedLines.replace(/\n/g, '\n<break time="2s"/>');
    const ssml = '<speak>' + expandedNewline + '</speak>';

    // Return the concatenated String of SSML
    return ssml;
  }
Generates SSML text from plaintext.

Given an input filename, this function converts the contents of the input text file
into a String of tagged SSML text. This function formats the SSML String so that,
when synthesized, the synthetic audio will pause for two seconds between each line
of the text file. This function also handles special text characters which might
interfere with SSML commands.

ARGS
inputfile: String name of plaintext file
RETURNS
a String of SSML text based on plaintext input