Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-14505

IBM Watson TTS Engine

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: Text To Speech
    • Labels:
      None
    • ToDo:
    • Asterisk Version:
      11,13,14
    • Distro Version:
      14
    • Distro:
      FreePBX Distro

      Description

      I recently deployed the IBM TTS on FreePBX using the TTS module, but when I add a custom engine the /var/lib/asterisk/agi-bin/propolys-tts.agi file does not include the custom engine, would I have some way to include the Custom engine code without the FreePBX modifications overwriting the propolys-tts.agi file?

      Code implemented:

      case 'watson':
      exec($enginebin." $engine-tts-$hash '$text' $hash");
      break;

      Engine code:

      !/bin/bash
      curl -X POST -u username:password \
      --header "Content-Type: application/json" \
      --header "Accept: audio/wav" \
      --data "

      {\"text\":\"$2\"}

      " \
      --output "/var/lib/asterisk/sounds/tts/$3.wav" \
      "https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_LisaVoice"
      /usr/bin/sox /var/lib/asterisk/sounds/tts/$3.wav -r 8000 -c 1 -e signed-integer /var/lib/asterisk/sounds/tts/$1.wav -q

      Another interesting change:

      Increase text of 250 to 2500 for example:

      Change sql text VARCHAR( 250 ) NOT NULL, in install.php

      $sql = "CREATE TABLE IF NOT EXISTS tts (
      id INTEGER NOT NULL $autoincrement,
      name VARCHAR( 100 ) NOT NULL,
      text VARCHAR( 250 ) NOT NULL,
      goto VARCHAR( 50 ),
      engine VARCHAR( 50 ),
      PRIMARY KEY (id)
      )";

      To text VARCHAR( 2500 ) NOT NULL,*:

      $sql = "CREATE TABLE IF NOT EXISTS tts (
      id INTEGER NOT NULL $autoincrement,
      name VARCHAR( 100 ) NOT NULL,
      text VARCHAR( 2500 ) NOT NULL,
      goto VARCHAR( 50 ),
      engine VARCHAR( 50 ),
      PRIMARY KEY (id)
      )";

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jersonjunior Jerson Jr
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: