Plugin Directory

Changeset 2044133


Ignore:
Timestamp:
03/04/2019 07:26:04 PM (7 years ago)
Author:
awslabs
Message:

3.0.1 trunk

Location:
amazon-polly/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • amazon-polly/trunk/README.md

    r2031081 r2044133  
    77| Requires PHP | 5.6 |
    88| Tested up to | 5.0 |
    9 | Stable tag | 3.0.0 |
     9| Stable tag | 3.0.1 |
    1010| License | GPLv3 ONLY |
    1111| License URI | https://www.gnu.org/licenses/gpl-3.0.html |
     
    237237#### Changelog
    238238
     239= 3.0.1 =
     240* Bug Fixing.
     241
    239242= 3.0.0 =
    240243* Alexa Integration added.
  • amazon-polly/trunk/README.txt

    r2031081 r2044133  
    55Requires PHP: 5.6
    66Tested up to: 5.0
    7 Stable tag: 3.0.0
     7Stable tag: 3.0.1
    88License: GPLv3 ONLY
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    232232== Changelog ==
    233233
     234= 3.0.1 =
     235* Bug Fixing.
     236
    234237= 3.0.0 =
    235238* Alexa Integration added.
  • amazon-polly/trunk/admin/AmazonAI-Common.php

    r2031081 r2044133  
    10811081
    10821082        $parts = $this->modify_speed($parts);
     1083
     1084        $logger = new AmazonAI_Logger();
     1085
     1086        foreach($parts as $part) {
     1087            $logger->log(sprintf('%s <<< PART >>> ', __METHOD__));
     1088            $logger->log(sprintf('%s', $part));
     1089        }
     1090
    10831091        return $parts;
    10841092    }
     
    11071115    }
    11081116
     1117    public function modify_sentence_speed($sentence)
     1118    {
     1119
     1120        $speed = $this->get_audio_speed();
     1121        if (100 !== $speed) {
     1122                $sentence = '<prosody rate="' . $speed . '%">' . $sentence . '</prosody>';
     1123        }
     1124
     1125
     1126        return $sentence;
     1127    }
     1128
    11091129    /**
    11101130     * Checks if post title should be added.
     
    11871207        $clean_text = strip_tags($clean_text, '<break>');
    11881208        $clean_text = esc_html($clean_text);
     1209
     1210
    11891211        $clean_text = str_replace('&nbsp;', ' ', $clean_text);
    11901212        $clean_text = preg_replace("/https:\/\/([^\s]+)/", "", $clean_text);
    11911213        $clean_text_temp = '';
     1214
    11921215        $paragraphs = explode("\n", $clean_text);
    11931216        foreach($paragraphs as $paragraph) {
     
    12111234
    12121235        //$new_clean_text = preg_replace('/<img.*?alt="(.*?)"[^\>]+>/', 'Image: $1.', $clean_text);
    1213         $new_clean_text = preg_replace('/<img.*?alt="(.*?)"[^\>]+>/', '$1.', $clean_text);
     1236        $new_clean_text = preg_replace('/<img.*?alt="(.*?)"[^\>]+>/', '$1', $clean_text);
    12141237
    12151238        return $new_clean_text;
  • amazon-polly/trunk/admin/AmazonAI-PollyService.php

    r1991560 r2044133  
    101101            // Cleaning text. Includes for example removing not supported characters etc.
    102102            $clean_text    = $common->clean_text( $post_id, true, false);
     103
     104            $logger->log(sprintf('%s <<< Clean Text >>> ', __METHOD__));
     105            $logger->log(sprintf('%s', $clean_text));
     106            $logger->log(sprintf('%s __________', __METHOD__));
     107
     108
    103109
    104110            // Breaking text into smaller parts, which will be then send to Amazon Polly for conversion.
     
    306312            // Remove all tags
    307313            $text_content = strip_tags($text_content);
     314
     315            // Modify Speed
     316            $text_content = $common->modify_sentence_speed($text_content);
    308317
    309318            // Adding breaths sounds (if enabled).
  • amazon-polly/trunk/amazonpolly.php

    r2031081 r2044133  
    1717 * Plugin URI:        https://wordpress.org/plugins/amazon-polly/
    1818 * Description:       Create audio version of your posts, translate them into other languages and create podcasts! Amazon Polly is a service that turns text into lifelike speech. With dozens of voices across a variety of languages, you can select the ideal voice and build engaging speech-enabled applications that work in many different countries. The Amazon Polly plugin for WordPress is a sample application that shows how WordPress creators can easily add Text-to-Speech capabilities to written content with Amazon Polly. You can generate an audio feed for text-based content and insert it into an embedded player to increase the accessibility of your WordPress site. The sample code also enables you to publish podcasts directly from your site and make them available for listeners in the form of podcasts. In addition, the plugin allows to translate your text from one language to another using Amazon Translate– which is a neural machine translation service that delivers fast, high-quality, and affordable language translation. Amazon Translate allows you to localize content - such as websites and applications - for international users, and to easily translate large volumes of text efficiently.
    19  * Version:           3.0.0
     19 * Version:           3.0.1
    2020 * Author:            AWS Labs, WP Engine
    2121 * Author URI:        https://aws.amazon.com/
Note: See TracChangeset for help on using the changeset viewer.