Changeset 2044133
- Timestamp:
- 03/04/2019 07:26:04 PM (7 years ago)
- Location:
- amazon-polly/trunk
- Files:
-
- 5 edited
-
README.md (modified) (2 diffs)
-
README.txt (modified) (2 diffs)
-
admin/AmazonAI-Common.php (modified) (4 diffs)
-
admin/AmazonAI-PollyService.php (modified) (2 diffs)
-
amazonpolly.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
amazon-polly/trunk/README.md
r2031081 r2044133 7 7 | Requires PHP | 5.6 | 8 8 | Tested up to | 5.0 | 9 | Stable tag | 3.0. 0|9 | Stable tag | 3.0.1 | 10 10 | License | GPLv3 ONLY | 11 11 | License URI | https://www.gnu.org/licenses/gpl-3.0.html | … … 237 237 #### Changelog 238 238 239 = 3.0.1 = 240 * Bug Fixing. 241 239 242 = 3.0.0 = 240 243 * Alexa Integration added. -
amazon-polly/trunk/README.txt
r2031081 r2044133 5 5 Requires PHP: 5.6 6 6 Tested up to: 5.0 7 Stable tag: 3.0. 07 Stable tag: 3.0.1 8 8 License: GPLv3 ONLY 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 232 232 == Changelog == 233 233 234 = 3.0.1 = 235 * Bug Fixing. 236 234 237 = 3.0.0 = 235 238 * Alexa Integration added. -
amazon-polly/trunk/admin/AmazonAI-Common.php
r2031081 r2044133 1081 1081 1082 1082 $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 1083 1091 return $parts; 1084 1092 } … … 1107 1115 } 1108 1116 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 1109 1129 /** 1110 1130 * Checks if post title should be added. … … 1187 1207 $clean_text = strip_tags($clean_text, '<break>'); 1188 1208 $clean_text = esc_html($clean_text); 1209 1210 1189 1211 $clean_text = str_replace(' ', ' ', $clean_text); 1190 1212 $clean_text = preg_replace("/https:\/\/([^\s]+)/", "", $clean_text); 1191 1213 $clean_text_temp = ''; 1214 1192 1215 $paragraphs = explode("\n", $clean_text); 1193 1216 foreach($paragraphs as $paragraph) { … … 1211 1234 1212 1235 //$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); 1214 1237 1215 1238 return $new_clean_text; -
amazon-polly/trunk/admin/AmazonAI-PollyService.php
r1991560 r2044133 101 101 // Cleaning text. Includes for example removing not supported characters etc. 102 102 $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 103 109 104 110 // Breaking text into smaller parts, which will be then send to Amazon Polly for conversion. … … 306 312 // Remove all tags 307 313 $text_content = strip_tags($text_content); 314 315 // Modify Speed 316 $text_content = $common->modify_sentence_speed($text_content); 308 317 309 318 // Adding breaths sounds (if enabled). -
amazon-polly/trunk/amazonpolly.php
r2031081 r2044133 17 17 * Plugin URI: https://wordpress.org/plugins/amazon-polly/ 18 18 * 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. 019 * Version: 3.0.1 20 20 * Author: AWS Labs, WP Engine 21 21 * Author URI: https://aws.amazon.com/
Note: See TracChangeset
for help on using the changeset viewer.