Plugin Directory

Changeset 2488447


Ignore:
Timestamp:
03/06/2021 01:45:10 PM (5 years ago)
Author:
ondoku3
Message:

Support voice ,speed and pitch selection.

Location:
ondoku/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ondoku/trunk/classes/hooks.php

    r2482643 r2488447  
    1616            return;
    1717
     18        $option = get_option( 'ondokusan_settings' , false );
     19
     20        if(!$option) return;
     21
     22
     23
    1824        // APIリクエスト
    19         $text = preg_replace('/\n|\r|\r\n/', '', strip_tags( $post->post_content ) );
    20         $params = [
    21             'text' => $text,
    22             'voice' => '',
    23             'speed' => '',
    24             'pitch' => ''
    25         ];
     25        $option['text'] = preg_replace('/\n|\r|\r\n/', '', strip_tags( $post->post_content ) );
     26
     27        $params['url'] = 'https://ondoku3.com/ja/text_to_speech_api/';
     28
     29        $params['body'] = array(
     30            'pitch' => $option['pitch'],
     31            'speed' => $option['speed'],
     32            'text' => $option['text'],
     33            'voice' => $option['voice']
     34        );
     35
     36        $params['headers'] = array(
     37            'token' => $option['token'],
     38            'content-Type' => 'application/json;'//application/json; charset=UTF-8
     39        );
    2640
    2741        try {
    2842
    2943
    30             $data = wp_remote_post('https://ondoku3.com/ja/text_to_speech_api/', array(
     44            $data = wp_remote_post($params['url'] , array(
    3145                'method' => 'POST',
    32                 'headers' => array(
    33                     'token' => get_option('ondokusan_token', ''),
    34                     'content-Type' => 'application/json; charset=utf-8'
    35                 ),
     46                'headers' => $params['headers'],
     47                //'timeout'     => 60,
     48                //'redirection' => 5,
     49                //'blocking'    => true,
    3650                'httpversion' => '1.0',
    3751                'sslverify' => false,
    38                 'body' => json_encode($params)
     52                'body' => json_encode($params['body'])
    3953            ));
    4054
     
    4357            }
    4458
     59
     60            /*['body']部分を抜き取り*/
    4561            $response = wp_remote_retrieve_body( $data );
    4662
     
    5167            if ( isset( $result['url'] ) ) {
    5268                update_post_meta( $post_id, 'ondoku_mp3_url', esc_url_raw( wp_unslash( $result['url'] ) ) );
     69            }else{
     70                delete_post_meta( $post_id, 'ondoku_mp3_url' );
    5371            }
    5472        } catch (\Exception $e) {
  • ondoku/trunk/classes/setting.php

    r2482666 r2488447  
    77        add_action( 'admin_menu', [ $this, 'add_page' ] );
    88        add_action( 'admin_init', [ $this, 'setting_save' ] );
     9
     10        /*プラグイン有効化時 オプション初期化*/
     11        register_activation_hook(ONDOKUSAN, array( $this, 'load_option' ) );
    912    }
    1013
     
    2629
    2730        // 設定値保存
    28         update_option( 'ondokusan_token', sanitize_text_field( $_POST['ondokusan_token'] ) );
     31        update_option( 'ondokusan_settings', array(
     32            'token' => sanitize_text_field( $_POST['ondokusan_token'] ),
     33            'language' => sanitize_text_field( $_POST['ondokusan_language'] ),
     34            'voice' => sanitize_text_field( $_POST['ondokusan_voice'] ),
     35            'speed' => sanitize_text_field( $_POST['ondokusan_speed'] ),
     36            'pitch' => sanitize_text_field( $_POST['ondokusan_pitch'] ),
     37        ) );
    2938
    3039        add_settings_error( 'ondokusan_setting', esc_attr( 'settings_updated' ), esc_html__('Saved the setting','ondoku3'), 'updated' );
     
    3544     */
    3645    public function setting_page() {
     46
     47        $option = $this->load_option();
     48
     49        $voices = $this->voices();
     50
    3751        ?>
    3852        <div class="wrap">
     
    4559                        <th scope="row"><?php esc_html_e('Access token','ondoku3'); ?></th>
    4660                        <td>
    47                             <input type="text" class="large-text" name="ondokusan_token" value="<?php echo esc_attr( get_option( 'ondokusan_token' ) ); ?>" />
     61                            <input type="text" class="large-text" name="ondokusan_token" value="<?php echo esc_attr( $option['token'] ); ?>" />
    4862                            <p class="description"><?php esc_html_e('Please enter the access token for the Ondoku API request.','ondoku3'); ?></p>
     63                        </td>
     64                    </tr>
     65                    <tr valign="top">
     66                        <th scope="row"><?php esc_html_e('Language','ondoku3'); ?></th>
     67                        <td>
     68                            <select id="ondokusan_languages" name="ondokusan_language">
     69                                <?php
     70                                foreach ($this->voice_languages() as $lang_key => $lang_val) {
     71                                    echo '<option value="'.$lang_key.'"'.selected( $option['language'], $lang_key ,false ).'>'.$lang_val.'</option>';
     72                                }
     73                                ?>
     74                            </select>
     75                        </td>
     76                    </tr>
     77
     78
     79                    <tr valign="top">
     80                        <th scope="row"><?php esc_html_e('Voices','ondoku3'); ?></th>
     81                        <td>
     82                            <select id="ondokusan_voices" name="ondokusan_voice">
     83                                <?php
     84                                $tmp_lang = $option['language'];
     85                                if( $tmp_lang === 'cmn-CN'){
     86                                    $tmp_lang = '-CN-';
     87                                }else if( $tmp_lang === 'cmn-TW'){
     88                                    $tmp_lang = '-TW-';
     89                                }
     90                                foreach ($voices as $voice_key => $voice_val) {
     91                                    if(stripos($voice_key,$tmp_lang)!==false){
     92                                        echo '<option value="'.$voice_key.'"'.selected( $option['voice'], $voice_key ,false ).'>'.$voice_val.'</option>';
     93                                    }
     94                                }
     95                                ?>
     96                            </select>
     97                        </td>
     98                    </tr>
     99
     100                    <tr valign="top">
     101                        <th scope="row"><?php esc_html_e('Speed','ondoku3'); ?> : (<span id="ondokusan_speed_now"><?php echo esc_attr($option['speed']); ?></span>)</th>
     102                        <td>
     103                            <input id="ondokusan_speed" type="range" name="ondokusan_speed" class="" min="0.3" max="4" step="0.1" value="<?php echo esc_attr($option['speed']); ?>" />
     104                        </td>
     105                    </tr>
     106                    <tr valign="top">
     107                        <th scope="row"><?php esc_html_e('Pitch','ondoku3'); ?> : (<span id="ondokusan_pitch_now"><?php echo esc_attr($option['pitch']); ?></span>)</th>
     108                        <td>
     109                            <input id="ondokusan_pitch" type="range" name="ondokusan_pitch" class="" min="-20" max="20" step="0.1" value="<?php echo esc_attr($option['pitch']); ?>" />
    49110                        </td>
    50111                    </tr>
     
    53114            </form>
    54115        </div>
     116
     117        <script>
     118
     119            var voices = <?php echo json_encode($voices); ?>;
     120            jQuery("#ondokusan_languages").change(function () {
     121
     122                var lang = jQuery(this).val();
     123
     124                jQuery('#ondokusan_voices').children().remove();
     125
     126                if( lang === 'cmn-CN'){
     127                    lang = '-CN-';
     128                }else if( lang === 'cmn-TW'){
     129                    lang = '-TW-';
     130                }
     131
     132                jQuery.each(voices, function(key, value){
     133                    if ( key.indexOf(lang) !== -1 ) {
     134                        jQuery('#ondokusan_voices').append(jQuery('<option>').attr({ value: key }).text(value));
     135                    }
     136
     137                })
     138            });
     139
     140            jQuery("#ondokusan_speed").on("input",function(){
     141                jQuery("#ondokusan_speed_now").html(jQuery(this).val());
     142            });
     143            jQuery("#ondokusan_pitch").on("input",function(){
     144                jQuery("#ondokusan_pitch_now").html(jQuery(this).val());
     145            });
     146
     147        </script>
     148        <style>
     149            input[type="range"]{
     150                width: 100%;
     151                max-width: 280px;
     152            }
     153        </style>
    55154        <?php
    56155    }
    57156
     157    public function load_option() {
     158        /*設定の読み出し*/
     159
     160        $option = get_option( 'ondokusan_settings' );
     161
     162        /*トークン初期化*/
     163        if(!isset($option['token'])){
     164            $option['token'] = '';
     165        }
     166        /*言語初期化*/
     167        if(!isset($option['language'])){
     168
     169            $locale = get_locale();
     170
     171            if($locale === 'zh-cn'){
     172                /*中国語*/
     173                $locale = 'cmn-CN';
     174            }elseif($locale === 'zh-tw'){
     175                /*台湾語*/
     176                $locale = 'cmn-TW';
     177            }elseif(strlen($locale) > 2){
     178                /*en-gbなどをen-GBに変換*/
     179                $substr = substr($locale, 0, -2);
     180                $locale = str_replace($substr, strtoupper($substr) , $locale);
     181            }
     182
     183            $option['language'] = $this->languages_adjustment($locale);
     184        }
     185        /*音声初期化*/
     186        if(!isset($option['voice'])){
     187            $option['voice'] = $this->voice_adjustment($option['language']);
     188        }
     189
     190        /*速度初期化*/
     191        if(!isset($option['speed'])){
     192            $option['speed'] = 1;
     193        }
     194        /*ピッチ初期化*/
     195        if(!isset($option['pitch'])){
     196            $option['pitch'] = 0;
     197        }
     198        /*Ver 1.0.1以前の仕様対応*/
     199        $tmp = get_option( 'ondokusan_token' );
     200        if($tmp){
     201            $option['token'] = $tmp;
     202            delete_option( 'ondokusan_token' );
     203        }
     204
     205        update_option( 'ondokusan_settings' , $option);
     206
     207        return $option;
     208
     209    }
     210
     211    public function languages_adjustment($lang) {
     212
     213        foreach($this->voice_languages() as $locale => $locale_val){
     214            if(stripos($locale,$lang)!==false){
     215                return $locale;
     216            }
     217        }
     218
     219        return 'en-US';
     220
     221    }
     222
     223    public function voice_adjustment($lang) {
     224
     225        foreach($this->voices() as $voice => $name ){
     226            if(stripos($voice,$lang)!==false){
     227                return $voice;
     228            }
     229        }
     230
     231        return 'en-US-Wavenet-A';
     232    }
     233
     234    public function voice_languages() {
     235        return array(
     236            'ar-XA' => 'عربى',
     237            'it-IT' => 'Italiano (Italia)',
     238            'id-ID' => 'Indonesia (Indonesia)',
     239            'uk-UA' => 'Український (Україна)',
     240            'nl-NL' => 'Nederlands (Nederland)',
     241            'el-GR' => 'Ελληνικά (Ελλάδα)',
     242            'sv-SE' => 'Svenska (Sverige)',
     243            'es-ES' => 'Español (España)',
     244            'sk-SK' => 'Slovenskú (Slovensko)',
     245            'cs-CZ' => 'Čeština (Česká republika)',
     246            'da-DK' => 'Dansk (Danmark)',
     247            'de-DE' => 'Deutsches Deutschland)',
     248            'tr-TR' => 'Türk (Türkiye)',
     249            'nb-NO' => 'Norsk (Norge)',
     250            'hu-HU' => 'Magyar (Magyarország)',
     251            'hi-IN' => 'हिंदी भारत)',
     252            'fil-PH' => 'Filipino (Pilipinas)',
     253            'fi-FI' => 'Suomi (Suomi)',
     254            'fr-CA' => 'Français (Canada)',
     255            'fr-FR' => 'France francaise)',
     256            'vi-VN' => 'Việt (Việt Nam)',
     257            'pl-PL' => 'Polski (Polska)',
     258            'pt-BR' => 'Português (Brasil)',
     259            'pt-PT' => 'Português (Portugal)',
     260            'ru-RU' => 'России (Россия)',
     261            'en-US' => 'English (USA)',
     262            'en-GB' => 'English (United Kingdom)',
     263            'en-IN' => 'English (India)',
     264            'en-AU' => 'English (Australia)',
     265            'ko-KR' => '한국어 (한국)',
     266            'ja-JP' => '日本語(日本)',
     267            'cmn-CN' => '中国标准',
     268            'cmn-TW' => '标准中国(台湾)',
     269        );
     270    }
     271
     272    public function voices() {
     273        return array(
     274            "ar-XA-Wavenet-A" => "ar-XA-A",
     275            "ar-XA-Wavenet-B" => "ar-XA-B",
     276            "ar-XA-Wavenet-C" => "ar-XA-C",
     277            "ar-XA-Zeina" => "Zeina",
     278            "ar-EG-SalmaNeural" => "Salma",
     279            "ar-EG-ShakirNeural" => "Shakira",
     280            "ar-SA-ZariyahNeural" => "Zariyah",
     281            "ar-SA-HamedNeural" => "Hamed",
     282            "ca-ES-AlbaNeural" => "Alba",
     283            "ca-ES-JoanaNeural" => "Joana",
     284            "ca-ES-EnricNeural" => "Enric",
     285            "cmn-CN-Wavenet-A" => "cmn-CN-A",
     286            "cmn-CN-Wavenet-B" => "cmn-CN-B",
     287            "cmn-CN-Wavenet-C" => "cmn-CN-C",
     288            "cmn-CN-Wavenet-D" => "cmn-CN-D",
     289            "cmn-CN-Zhiyu" => "Zhiyu",
     290            "cmn-TW-Wavenet-A" => "cmn-TW-A",
     291            "cmn-TW-Wavenet-B" => "cmn-TW-B",
     292            "cmn-TW-Wavenet-C" => "cmn-TW-C",
     293            "cy-GB-Gwyneth" => "Gwyneth",
     294            "cs-CZ-Wavenet-A" => "cs-CZ-A",
     295            "cs-CZ-VlastaNeural" =>  "Vlasta",
     296            "cs-CZ-AntoninNeural" => "Antonin",
     297            "de-AT-IngridNeural" => "Ingrid",
     298            "de-AT-JonasNeural" => "Jonas",
     299            "da-DK-Wavenet-A" => "da-DK-A",
     300            "da-DK-Wavenet-B" => "da-DK-B",
     301            "da-DK-Wavenet-C" => "da-DK-C",
     302            "da-DK-Wavenet-D" => "da-DK-D",
     303            "da-DK-Naja" => "Naja",
     304            "da-DK-Mads" => "Mads",
     305            "da-DK-ChristelNeural" => "Christel",
     306            "da-DK-JeppeNeural" => "Jeppe",
     307            "de-DE-Wavenet-A" => "de-DE-A",
     308            "de-DE-Wavenet-B" => "de-DE-B",
     309            "de-DE-Wavenet-C" => "de-DE-C",
     310            "de-DE-Wavenet-D" => "de-DE-D",
     311            "de-DE-Wavenet-E" => "de-DE-E",
     312            "de-DE-Wavenet-F" => "de-DE-F",
     313            "de-DE-Marlene" => "Marlene",
     314            "de-DE-Vicki" => "Vicki",
     315            "de-DE-Hans" => "Hans",
     316            "de-DE-KatjaNeural" => "Katja",
     317            "de-DE-ConradNeural" => "Conrad",
     318            "de-CH-LeniNeural" => "Leni",
     319            "de-CH-JanNeural" => "Jan",
     320            "bg-BG-KalinaNeural" => "Kalina",
     321            "bg-BG-BorislavNeural" => "Borislav",
     322            "el-GR-Wavenet-A" => "el-GR-A",
     323            "el-GR-AthinaNeural" => "Athina",
     324            "el-GR-NestorasNeural" => "Nestoras",
     325            "en-AU-Wavenet-A" => "en-AU-A",
     326            "en-AU-Wavenet-B" => "en-AU-B",
     327            "en-AU-Wavenet-C" => "en-AU-C",
     328            "en-AU-Wavenet-D" => "en-AU-D",
     329            "en-AU-Nicole" => "Nicole",
     330            "en-AU-Olivia" => "Olivia",
     331            "en-AU-Russell" => "Russell",
     332            "en-IN-Wavenet-A" => "en-IN-A",
     333            "en-IN-Wavenet-B" => "en-IN-B",
     334            "en-IN-Wavenet-C" => "en-IN-C",
     335            "en-IN-Wavenet-D" => "en-IN-D",
     336            "en-IN-Aditi" => "Aditi",
     337            "en-IN-Raveena" => "Raveena",
     338            "en-GB-Wavenet-A" => "en-GB-A",
     339            "en-GB-Wavenet-B" => "en-GB-B",
     340            "en-GB-Wavenet-C" => "en-GB-C",
     341            "en-GB-Wavenet-D" => "en-GB-D",
     342            "en-GB-Wavenet-E" => "en-GB-E",
     343            "en-GB-Wavenet-F" => "en-GB-F",
     344            "en-GB-Amy" => "Amy",
     345            "en-GB-Emma" => "Emma",
     346            "en-GB-Brian" => "Brian",
     347            "en-GB-Geraint" => "Geraint",
     348            "en-US-Wavenet-A" => "en-US-A",
     349            "en-US-Wavenet-B" => "en-US-B",
     350            "en-US-Wavenet-C" => "en-US-C",
     351            "en-US-Wavenet-D" => "en-US-D",
     352            "en-US-Wavenet-E" => "en-US-E",
     353            "en-US-Ivy" => "Ivy",
     354            "en-US-Joanna" => "Joanna",
     355            "en-US-Kendra" => "Kendra",
     356            "en-US-Kimberly" => "Kimberly",
     357            "en-US-Salli" => "Salli",
     358            "en-US-Joey" => "Joey",
     359            "en-US-Justin" => "Justin",
     360            "en-US-Kevin" => "Kevin",
     361            "en-US-Matthew" => "Matthew",
     362            "en-AU-NatashaNeural" => "Natasha",
     363            "en-AU-WilliamNeural" => "William",
     364            "en-CA-ClaraNeural" => "Clara",
     365            "en-CA-LiamNeural" => "Liam",
     366            "en-IN-NeerjaNeural" => "Neerja",
     367            "en-IN-PrabhatNeural" => "Prabhat",
     368            "en-IE-EmilyNeural" => "Emily",
     369            "en-IE-ConnorNeural" => "Connor",
     370            "en-GB-LibbyNeural" => "Libby",
     371            "en-GB-MiaNeural" => "Mia",
     372            "en-GB-RyanNeural" => "Ryan",
     373            "en-US-AriaNeural" => "Aria",
     374            "en-US-JennyNeural" => "Jenny",
     375            "en-US-GuyNeural" => "Guy",
     376            "es-ES-Standard-A" => "es-ES-A",
     377            "es-ES-Conchita" => "Conchita",
     378            "es-ES-Lucia" => "Lucia",
     379            "es-ES-Enrique" => "Enrique",
     380            "es-MX-Mia" => "Mia",
     381            "es-ES-ElviraNeural" => "Elvira",
     382            "es-ES-AlvaroNeural" => "Alvaro",
     383            "es-US-Lupe" => "Lupe",
     384            "es-US-Penelope" => "Penelope",
     385            "es-US-Miguel" => "Miguel",
     386            "es-MX-DaliaNeural" => "Dalia",
     387            "es-MX-JorgeNeural" => "Jorge",
     388            "fil-PH-Wavenet-A" => "fil-PH-A",
     389            "fil-PH-Wavenet-B" => "fil-PH-B",
     390            "fil-PH-Wavenet-C" => "fil-PH-C",
     391            "fil-PH-Wavenet-D" => "fil-PH-D",
     392            "fi-FI-Wavenet-A" => "fi-FI-A",
     393            "fi-FI-NooraNeural" => "Noora",
     394            "fi-FI-SelmaNeural" => "Selma",
     395            "fi-FI-HarriNeural" => "Harri",
     396            "fr-CA-Wavenet-A" => "fr-CA-A",
     397            "fr-CA-Wavenet-B" => "fr-CA-B",
     398            "fr-CA-Wavenet-C" => "fr-CA-C",
     399            "fr-CA-Wavenet-D" => "fr-CA-D",
     400            "fr-CA-Chantal" => "Chantal",
     401            "fr-CA-SylvieNeural" => "Sylvie",
     402            "fr-CA-AntoineNeural" => "Antoine",
     403            "fr-CA-JeanNeural" => "Jean",
     404            "fr-FR-Wavenet-A" => "fr-FR-A",
     405            "fr-FR-Wavenet-B" => "fr-FR-B",
     406            "fr-FR-Wavenet-C" => "fr-FR-C",
     407            "fr-FR-Wavenet-D" => "fr-FR-D",
     408            "fr-FR-Wavenet-E" => "fr-FR-E",
     409            "fr-FR-Celine" => "Celine",
     410            "fr-FR-Léa" => "Léa",
     411            "fr-FR-Mathieu" => "Mathieu",
     412            "fr-FR-DeniseNeural" => "Denise",
     413            "fr-FR-HenriNeural" => "Henri",
     414            "fr-CH-ArianeNeural" => "Ariane",
     415            "fr-CH-FabriceNeural" => "Fabrice",
     416            "he-IL-HilaNeural" => "Hila",
     417            "he-IL-AvriNeural" => "Avri",
     418            "hi-IN-Wavenet-A" => "hi-IN-A",
     419            "hi-IN-Wavenet-B" => "hi-IN-B",
     420            "hi-IN-Wavenet-C" => "hi-IN-C",
     421            "hi-IN-Wavenet-D" => "hi-IN-D",
     422            "hi-IN-Aditi" => "Aditi",
     423            "hi-IN-SwaraNeural" => "Swara",
     424            "hi-IN-MadhurNeural" => "Madhur",
     425            "hr-HR-GabrijelaNeural" => "Gabrijela",
     426            "hr-HR-SreckoNeural" => "Srecko",
     427            "hu-HU-Wavenet-A" => "hu-HU-A",
     428            "hu-HU-NoemiNeural" => "Noemi",
     429            "hu-HU-TamasNeural" => "Tamas",
     430            "id-ID-Wavenet-A" => "id-ID-A",
     431            "id-ID-Wavenet-B" => "id-ID-B",
     432            "id-ID-Wavenet-C" => "id-ID-C",
     433            "id-ID-Wavenet-D" => "id-ID-D",
     434            "id-ID-GadisNeural" => "Gadis",
     435            "id-ID-ArdiNeural" => "Ardi",
     436            "is-IS-Dora" => "Dora",
     437            "is-IS-Karl" => "Karl",
     438            "it-IT-Wavenet-A" => "it-IT-A",
     439            "it-IT-Wavenet-B" => "it-IT-B",
     440            "it-IT-Wavenet-C" => "it-IT-C",
     441            "it-IT-Wavenet-D" => "it-IT-D",
     442            "it-IT-Carla" => "Carla",
     443            "it-IT-Bianca" => "Bianca",
     444            "it-IT-Giorgio" => "Giorgio",
     445            "it-IT-ElsaNeural" => "Elsa",
     446            "it-IT-IsabellaNeural" => "Isabella",
     447            "it-IT-DiegoNeural" => "Diego",
     448            "ja-JP-Wavenet-A" => "ja-JP-A",
     449            "ja-JP-Wavenet-B" => "ja-JP-B",
     450            "ja-JP-Wavenet-C" => "ja-JP-C",
     451            "ja-JP-Wavenet-D" => "ja-JP-D",
     452            "ja-JP-Takumi" => "たくみ",
     453            "ja-JP-Mizuki" => "みずき",
     454            "ja-JP-NanamiNeural" => "ななみ",
     455            "ja-JP-KeitaNeural" => "けいた",
     456            "ko-KR-Wavenet-A" => "ko-KR-A",
     457            "ko-KR-Wavenet-B" => "ko-KR-B",
     458            "ko-KR-Wavenet-C" => "ko-KR-C",
     459            "ko-KR-Wavenet-D" => "ko-KR-D",
     460            "ko-KR-Seoyeon" => "Seoyeon",
     461            "ko-KR-SunHiNeural" => "SunHi",
     462            "ko-KR-InJoonNeural" => "InJoon",
     463            "ms-MY-YasminNeural" => "Yasmin",
     464            "ms-MY-OsmanNeural" => "Osman",
     465            "nb-NO-Wavenet-A" => "nb-NO-A",
     466            "nb-NO-Wavenet-B" => "nb-NO-B",
     467            "nb-NO-Wavenet-C" => "nb-NO-C",
     468            "nb-NO-Wavenet-D" => "nb-NO-D",
     469            "nb-NO-Wavenet-E" => "nb-NO-E",
     470            "nb-NO-Liv" => "Liv",
     471            "nb-NO-IselinNeural" => "Iselin",
     472            "nb-NO-PernilleNeural" => "Pernille",
     473            "nb-NO-FinnNeural" => "Finn",
     474            "nl-NL-Wavenet-A" => "nl-NL-A",
     475            "nl-NL-Wavenet-B" => "nl-NL-B",
     476            "nl-NL-Wavenet-C" => "nl-NL-C",
     477            "nl-NL-Wavenet-D" => "nl-NL-D",
     478            "nl-NL-Wavenet-E" => "nl-NL-E",
     479            "nl-NL-Lotte" => "Lotte",
     480            "nl-NL-Ruben" => "Ruben",
     481            "nl-NL-ColetteNeural" => "Colette",
     482            "nl-NL-FennaNeural" => "Fenna",
     483            "nl-NL-MaartenNeural" => "Maarten",
     484            "pl-PL-Wavenet-A" => "pl-PL-A",
     485            "pl-PL-Wavenet-B" => "pl-PL-B",
     486            "pl-PL-Wavenet-C" => "pl-PL-C",
     487            "pl-PL-Wavenet-D" => "pl-PL-D",
     488            "pl-PL-Wavenet-E" => "pl-PL-E",
     489            "pl-PL-Ewa" => "Ewa",
     490            "pl-PL-Maja" => "Maja",
     491            "pl-PL-Jacek" => "Jacek",
     492            "pl-PL-Jan" => "Jan",
     493            "pl-PL-AgnieszkaNeural" => "Agnieszka",
     494            "pl-PL-ZofiaNeural" => "Zofia",
     495            "pl-PL-MarekNeural" => "Marek",
     496            "pt-BR-Wavenet-A" => "pt-BR-A",
     497            "pt-BR-Camila" => "Camila",
     498            "pt-BR-Vitoria" => "Vitoria",
     499            "pt-BR-Ricardo" => "Ricardo",
     500            "pt-BR-FranciscaNeural" => "Francisca",
     501            "pt-BR-AntonioNeural" => "Antonio",
     502            "pt-PT-Wavenet-A" => "pt-PT-A",
     503            "pt-PT-Wavenet-B" => "pt-PT-B",
     504            "pt-PT-Wavenet-C" => "pt-PT-C",
     505            "pt-PT-Wavenet-D" => "pt-PT-D",
     506            "pt-PT-Ines" => "Ines",
     507            "pt-PT-Cristiano" => "Cristiano",
     508            "pt-PT-FernandaNeural" => "Fernanda",
     509            "pt-PT-RaquelNeural" => "Raquel",
     510            "pt-PT-DuarteNeural" => "Duarte",
     511            "ro-RO-Carmen" => "Carmen",
     512            "ro-RO-AlinaNeural" => "Alina",
     513            "ro-RO-EmilNeural" => "Emil",
     514            "ru-RU-Wavenet-A" => "ru-RU-A",
     515            "ru-RU-Wavenet-B" => "ru-RU-B",
     516            "ru-RU-Wavenet-C" => "ru-RU-C",
     517            "ru-RU-Wavenet-D" => "ru-RU-D",
     518            "ru-RU-Wavenet-E" => "ru-RU-E",
     519            "ru-RU-Tatyana" => "Tatyana",
     520            "ru-RU-Maxim" => "Maxim",
     521            "ru-RU-DariyaNeural" => "Dariya",
     522            "ru-RU-SvetlanaNeural" => "Svetlana",
     523            "ru-RU-DmitryNeural" => "Dmitry",
     524            "sk-SK-Wavenet-A" => "sk-SK-A",
     525            "sk-SK-ViktoriaNeural" => "Viktoria",
     526            "sk-SK-LukasNeural" => "Lukas",
     527            "sl-SI-PetraNeural" => "Petra",
     528            "sl-SI-RokNeural" => "Rok",
     529            "sv-SE-Wavenet-A" => "sv-SE-A",
     530            "sv-SE-Astrid" => "Astrid",
     531            "sv-SE-HilleviNeural" => "Hillevi",
     532            "sv-SE-SofieNeural" => "Sofie",
     533            "sv-SE-MattiasNeural" => "Mattias",
     534            "ta-IN-PallaviNeural" => "Pallavi",
     535            "ta-IN-ValluvarNeural" => "Valluvar",
     536            "te-IN-ShrutiNeural" => "Shruti",
     537            "te-IN-MohanNeural" => "Mohan",
     538            "th-TH-AcharaNeural" => "Achara",
     539            "th-TH-PremwadeeNeural" => "Premwadee",
     540            "th-TH-NiwatNeural" => "Niwat",
     541            "tr-TR-Wavenet-A" => "tr-TR-A",
     542            "tr-TR-Wavenet-B" => "tr-TR-B",
     543            "tr-TR-Wavenet-C" => "tr-TR-C",
     544            "tr-TR-Wavenet-D" => "tr-TR-D",
     545            "tr-TR-Wavenet-E" => "tr-TR-E",
     546            "tr-TR-Filiz" => "Filiz",
     547            "tr-TR-EmelNeural" => "Emel",
     548            "tr-TR-AhmetNeural" => "Ahmet",
     549            "uk-UA-Wavenet-A" => "uk-UA-A",
     550            "vi-VN-Wavenet-A" => "vi-VN-A",
     551            "vi-VN-Wavenet-B" => "vi-VN-B",
     552            "vi-VN-Wavenet-C" => "vi-VN-C",
     553            "vi-VN-Wavenet-D" => "vi-VN-D",
     554            "vi-VN-HoaiMyNeural" => "HoaiMy",
     555            "vi-VN-NamMinhNeural" => "NamMinh",
     556            "zh-HK-HiuGaaiNeural" => "HiuGaai",
     557            "zh-HK-HiuMaanNeural" => "HiuMaan",
     558            "zh-HK-WanLungNeural" => "WanLung",
     559            "zh-CN-XiaoxiaoNeural" => "Xiaoxiao",
     560            "zh-CN-XiaoyouNeural" => "Xiaoyou",
     561            "zh-CN-YunyangNeural" => "Yunyang",
     562            "zh-CN-YunyeNeural" => "Yunye",
     563            "zh-TW-HsiaoChenNeural" => "HsiaoChen",
     564            "zh-TW-HsiaoYuNeural" => "HsiaoYu",
     565            "zh-TW-YunJheNeural" => "YunJhe",
     566        );
    58567}
     568}
  • ondoku/trunk/languages/ondoku3-ja.po

    r2482643 r2488447  
    22msgstr ""
    33"Project-Id-Version: text-to-speech Ondoku\n"
    4 "POT-Creation-Date: 2021-02-24 21:02+0900\n"
    5 "PO-Revision-Date: 2021-02-24 21:25+0900\n"
     4"POT-Creation-Date: 2021-02-28 15:47+0900\n"
     5"PO-Revision-Date: 2021-02-28 15:48+0900\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2121"X-Poedit-SearchPathExcluded-0: *.js\n"
    2222
    23 #: classes/hooks.php:55
     23#: classes/HOOKS-~2.PHP:55 classes/hooks.php:61
    2424msgid "API error"
    2525msgstr "APIエラー"
    2626
     27#: classes/SETTIN~2.PHP:15 classes/SETTIN~2.PHP:39 classes/setting.php:18
     28#: classes/setting.php:53
     29msgid "Ondoku settings"
     30msgstr "音読さんの設定"
     31
    2732#. Author of the plugin/theme
    28 #: classes/setting.php:15
     33#: classes/SETTIN~2.PHP:15 classes/setting.php:18
    2934msgid "Ondoku"
    3035msgstr "音読さん"
    3136
    32 #: classes/setting.php:30
     37#: classes/SETTIN~2.PHP:30 classes/setting.php:39
    3338msgid "Saved the setting"
    3439msgstr "設定を保存しました"
    3540
    36 #: classes/setting.php:39
    37 msgid "Ondoku settings"
    38 msgstr "音読さんの設定"
    39 
    40 #: classes/setting.php:45
     41#: classes/SETTIN~2.PHP:45 classes/setting.php:59
    4142msgid "Access token"
    4243msgstr "アクセストークン"
    4344
    44 #: classes/setting.php:48
     45#: classes/SETTIN~2.PHP:48 classes/setting.php:62
    4546msgid "Please enter the access token for the Ondoku API request."
    4647msgstr "音読さんAPIリクエストのためのアクセストークンを入力してください。"
    4748
    48 #: classes/setting.php:52
     49#: classes/SETTIN~2.PHP:52 classes/setting.php:107
    4950msgid "Save"
    5051msgstr "保存"
     52
     53#: classes/setting.php:66
     54msgid "Language"
     55msgstr "言語"
     56
     57#: classes/setting.php:80
     58msgid "Voices"
     59msgstr "音声"
     60
     61#: classes/setting.php:95
     62msgid "Speed"
     63msgstr "速度"
     64
     65#: classes/setting.php:101
     66msgid "Pitch"
     67msgstr "高低"
    5168
    5269#. Plugin Name of the plugin/theme
  • ondoku/trunk/ondokusan.php

    r2482666 r2488447  
    44Description: Create an audio file that automatically reads the text aloud when posting a blog, and insert it with an HTML tag at the beginning of the blog.
    55Author: Ondoku
    6 Version: 1.0.1
     6Version: 1.0.2
    77Text Domain: ondoku3
    88Domain Path: /languages/
  • ondoku/trunk/readme.txt

    r2482666 r2488447  
    55Requires at least: 5.1
    66Requires PHP: 7.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.