piper-phonemize-node 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/addon-static-import.js +58 -0
- package/addon.js +70 -0
- package/espeak-ng-data/af_dict +0 -0
- package/espeak-ng-data/am_dict +0 -0
- package/espeak-ng-data/an_dict +0 -0
- package/espeak-ng-data/ar_dict +0 -0
- package/espeak-ng-data/as_dict +0 -0
- package/espeak-ng-data/az_dict +0 -0
- package/espeak-ng-data/ba_dict +0 -0
- package/espeak-ng-data/be_dict +0 -0
- package/espeak-ng-data/bg_dict +0 -0
- package/espeak-ng-data/bn_dict +0 -0
- package/espeak-ng-data/bpy_dict +0 -0
- package/espeak-ng-data/bs_dict +0 -0
- package/espeak-ng-data/ca_dict +0 -0
- package/espeak-ng-data/chr_dict +0 -0
- package/espeak-ng-data/cmn_dict +0 -0
- package/espeak-ng-data/cs_dict +0 -0
- package/espeak-ng-data/cv_dict +0 -0
- package/espeak-ng-data/cy_dict +0 -0
- package/espeak-ng-data/da_dict +0 -0
- package/espeak-ng-data/de_dict +0 -0
- package/espeak-ng-data/el_dict +0 -0
- package/espeak-ng-data/en_dict +0 -0
- package/espeak-ng-data/eo_dict +0 -0
- package/espeak-ng-data/es_dict +0 -0
- package/espeak-ng-data/et_dict +0 -0
- package/espeak-ng-data/eu_dict +0 -0
- package/espeak-ng-data/fa_dict +0 -0
- package/espeak-ng-data/fi_dict +0 -0
- package/espeak-ng-data/fr_dict +0 -0
- package/espeak-ng-data/ga_dict +0 -0
- package/espeak-ng-data/gd_dict +0 -0
- package/espeak-ng-data/gn_dict +0 -0
- package/espeak-ng-data/grc_dict +0 -0
- package/espeak-ng-data/gu_dict +0 -0
- package/espeak-ng-data/hak_dict +0 -0
- package/espeak-ng-data/haw_dict +0 -0
- package/espeak-ng-data/he_dict +0 -0
- package/espeak-ng-data/hi_dict +0 -0
- package/espeak-ng-data/hr_dict +0 -0
- package/espeak-ng-data/ht_dict +0 -0
- package/espeak-ng-data/hu_dict +0 -0
- package/espeak-ng-data/hy_dict +0 -0
- package/espeak-ng-data/ia_dict +0 -0
- package/espeak-ng-data/id_dict +0 -0
- package/espeak-ng-data/intonations +0 -0
- package/espeak-ng-data/io_dict +0 -0
- package/espeak-ng-data/is_dict +0 -0
- package/espeak-ng-data/it_dict +0 -0
- package/espeak-ng-data/ja_dict +0 -0
- package/espeak-ng-data/jbo_dict +0 -0
- package/espeak-ng-data/ka_dict +0 -0
- package/espeak-ng-data/kk_dict +0 -0
- package/espeak-ng-data/kl_dict +0 -0
- package/espeak-ng-data/kn_dict +0 -0
- package/espeak-ng-data/ko_dict +0 -0
- package/espeak-ng-data/kok_dict +0 -0
- package/espeak-ng-data/ku_dict +0 -0
- package/espeak-ng-data/ky_dict +0 -0
- package/espeak-ng-data/la_dict +0 -0
- package/espeak-ng-data/lang/aav/vi +8 -0
- package/espeak-ng-data/lang/aav/vi-VN-x-central +9 -0
- package/espeak-ng-data/lang/aav/vi-VN-x-south +9 -0
- package/espeak-ng-data/lang/art/eo +4 -0
- package/espeak-ng-data/lang/art/ia +2 -0
- package/espeak-ng-data/lang/art/io +5 -0
- package/espeak-ng-data/lang/art/jbo +4 -0
- package/espeak-ng-data/lang/art/lfn +8 -0
- package/espeak-ng-data/lang/art/piqd +5 -0
- package/espeak-ng-data/lang/art/py +7 -0
- package/espeak-ng-data/lang/art/qdb +6 -0
- package/espeak-ng-data/lang/art/qya +4 -0
- package/espeak-ng-data/lang/art/sjn +4 -0
- package/espeak-ng-data/lang/azc/nci +6 -0
- package/espeak-ng-data/lang/bat/lt +2 -0
- package/espeak-ng-data/lang/bat/ltg +12 -0
- package/espeak-ng-data/lang/bat/lv +9 -0
- package/espeak-ng-data/lang/bnt/sw +4 -0
- package/espeak-ng-data/lang/bnt/tn +4 -0
- package/espeak-ng-data/lang/ccs/ka +3 -0
- package/espeak-ng-data/lang/cel/cy +4 -0
- package/espeak-ng-data/lang/cel/ga +4 -0
- package/espeak-ng-data/lang/cel/gd +4 -0
- package/espeak-ng-data/lang/cus/om +4 -0
- package/espeak-ng-data/lang/dra/kn +5 -0
- package/espeak-ng-data/lang/dra/ml +5 -0
- package/espeak-ng-data/lang/dra/ta +5 -0
- package/espeak-ng-data/lang/dra/te +7 -0
- package/espeak-ng-data/lang/esx/kl +3 -0
- package/espeak-ng-data/lang/eu +5 -0
- package/espeak-ng-data/lang/gmq/da +4 -0
- package/espeak-ng-data/lang/gmq/is +2 -0
- package/espeak-ng-data/lang/gmq/nb +7 -0
- package/espeak-ng-data/lang/gmq/sv +2 -0
- package/espeak-ng-data/lang/gmw/af +8 -0
- package/espeak-ng-data/lang/gmw/de +3 -0
- package/espeak-ng-data/lang/gmw/en +8 -0
- package/espeak-ng-data/lang/gmw/en-029 +20 -0
- package/espeak-ng-data/lang/gmw/en-GB-scotland +17 -0
- package/espeak-ng-data/lang/gmw/en-GB-x-gbclan +14 -0
- package/espeak-ng-data/lang/gmw/en-GB-x-gbcwmd +12 -0
- package/espeak-ng-data/lang/gmw/en-GB-x-rp +15 -0
- package/espeak-ng-data/lang/gmw/en-US +15 -0
- package/espeak-ng-data/lang/gmw/en-US-nyc +14 -0
- package/espeak-ng-data/lang/gmw/lb +2 -0
- package/espeak-ng-data/lang/gmw/nl +2 -0
- package/espeak-ng-data/lang/grk/el +2 -0
- package/espeak-ng-data/lang/grk/grc +6 -0
- package/espeak-ng-data/lang/inc/as +4 -0
- package/espeak-ng-data/lang/inc/bn +2 -0
- package/espeak-ng-data/lang/inc/bpy +2 -0
- package/espeak-ng-data/lang/inc/gu +4 -0
- package/espeak-ng-data/lang/inc/hi +2 -0
- package/espeak-ng-data/lang/inc/kok +2 -0
- package/espeak-ng-data/lang/inc/mr +4 -0
- package/espeak-ng-data/lang/inc/ne +4 -0
- package/espeak-ng-data/lang/inc/or +4 -0
- package/espeak-ng-data/lang/inc/pa +2 -0
- package/espeak-ng-data/lang/inc/sd +3 -0
- package/espeak-ng-data/lang/inc/si +6 -0
- package/espeak-ng-data/lang/inc/ur +7 -0
- package/espeak-ng-data/lang/ine/hy +3 -0
- package/espeak-ng-data/lang/ine/hyw +24 -0
- package/espeak-ng-data/lang/ine/sq +5 -0
- package/espeak-ng-data/lang/ira/fa +4 -0
- package/espeak-ng-data/lang/ira/fa-Latn +8 -0
- package/espeak-ng-data/lang/ira/ku +5 -0
- package/espeak-ng-data/lang/iro/chr +27 -0
- package/espeak-ng-data/lang/itc/la +12 -0
- package/espeak-ng-data/lang/jpx/ja +5 -0
- package/espeak-ng-data/lang/ko +5 -0
- package/espeak-ng-data/lang/map/haw +3 -0
- package/espeak-ng-data/lang/miz/mto +8 -0
- package/espeak-ng-data/lang/myn/quc +6 -0
- package/espeak-ng-data/lang/poz/id +7 -0
- package/espeak-ng-data/lang/poz/mi +21 -0
- package/espeak-ng-data/lang/poz/ms +14 -0
- package/espeak-ng-data/lang/qu +5 -0
- package/espeak-ng-data/lang/roa/an +2 -0
- package/espeak-ng-data/lang/roa/ca +2 -0
- package/espeak-ng-data/lang/roa/es +4 -0
- package/espeak-ng-data/lang/roa/es-419 +11 -0
- package/espeak-ng-data/lang/roa/fr +6 -0
- package/espeak-ng-data/lang/roa/fr-BE +8 -0
- package/espeak-ng-data/lang/roa/fr-CH +6 -0
- package/espeak-ng-data/lang/roa/ht +8 -0
- package/espeak-ng-data/lang/roa/it +7 -0
- package/espeak-ng-data/lang/roa/pap +7 -0
- package/espeak-ng-data/lang/roa/pt +7 -0
- package/espeak-ng-data/lang/roa/pt-BR +7 -0
- package/espeak-ng-data/lang/roa/ro +2 -0
- package/espeak-ng-data/lang/sai/gn +4 -0
- package/espeak-ng-data/lang/sem/am +4 -0
- package/espeak-ng-data/lang/sem/ar +5 -0
- package/espeak-ng-data/lang/sem/he +4 -0
- package/espeak-ng-data/lang/sem/mt +4 -0
- package/espeak-ng-data/lang/sit/cmn +36 -0
- package/espeak-ng-data/lang/sit/cmn-Latn-pinyin +11 -0
- package/espeak-ng-data/lang/sit/hak +6 -0
- package/espeak-ng-data/lang/sit/my +3 -0
- package/espeak-ng-data/lang/sit/yue +13 -0
- package/espeak-ng-data/lang/sit/yue-Latn-jyutping +13 -0
- package/espeak-ng-data/lang/tai/shn +4 -0
- package/espeak-ng-data/lang/tai/th +3 -0
- package/espeak-ng-data/lang/trk/az +4 -0
- package/espeak-ng-data/lang/trk/ba +2 -0
- package/espeak-ng-data/lang/trk/cv +3 -0
- package/espeak-ng-data/lang/trk/kk +4 -0
- package/espeak-ng-data/lang/trk/ky +4 -0
- package/espeak-ng-data/lang/trk/nog +3 -0
- package/espeak-ng-data/lang/trk/tk +2 -0
- package/espeak-ng-data/lang/trk/tr +2 -0
- package/espeak-ng-data/lang/trk/tt +2 -0
- package/espeak-ng-data/lang/trk/ug +2 -0
- package/espeak-ng-data/lang/trk/uz +4 -0
- package/espeak-ng-data/lang/urj/et +10 -0
- package/espeak-ng-data/lang/urj/fi +11 -0
- package/espeak-ng-data/lang/urj/hu +7 -0
- package/espeak-ng-data/lang/urj/smj +4 -0
- package/espeak-ng-data/lang/zle/be +4 -0
- package/espeak-ng-data/lang/zle/ru +4 -0
- package/espeak-ng-data/lang/zle/ru-LV +16 -0
- package/espeak-ng-data/lang/zle/ru-cl +6 -0
- package/espeak-ng-data/lang/zle/uk +7 -0
- package/espeak-ng-data/lang/zls/bg +5 -0
- package/espeak-ng-data/lang/zls/bs +14 -0
- package/espeak-ng-data/lang/zls/hr +15 -0
- package/espeak-ng-data/lang/zls/mk +2 -0
- package/espeak-ng-data/lang/zls/sl +4 -0
- package/espeak-ng-data/lang/zls/sr +13 -0
- package/espeak-ng-data/lang/zlw/cs +2 -0
- package/espeak-ng-data/lang/zlw/pl +4 -0
- package/espeak-ng-data/lang/zlw/sk +2 -0
- package/espeak-ng-data/lb_dict +0 -0
- package/espeak-ng-data/lfn_dict +0 -0
- package/espeak-ng-data/lt_dict +0 -0
- package/espeak-ng-data/lv_dict +0 -0
- package/espeak-ng-data/mi_dict +0 -0
- package/espeak-ng-data/mk_dict +0 -0
- package/espeak-ng-data/ml_dict +0 -0
- package/espeak-ng-data/mr_dict +0 -0
- package/espeak-ng-data/ms_dict +0 -0
- package/espeak-ng-data/mt_dict +0 -0
- package/espeak-ng-data/mto_dict +0 -0
- package/espeak-ng-data/my_dict +0 -0
- package/espeak-ng-data/nci_dict +0 -0
- package/espeak-ng-data/ne_dict +0 -0
- package/espeak-ng-data/nl_dict +0 -0
- package/espeak-ng-data/no_dict +0 -0
- package/espeak-ng-data/nog_dict +0 -0
- package/espeak-ng-data/om_dict +0 -0
- package/espeak-ng-data/or_dict +0 -0
- package/espeak-ng-data/pa_dict +0 -0
- package/espeak-ng-data/pap_dict +0 -0
- package/espeak-ng-data/phondata +0 -0
- package/espeak-ng-data/phondata-manifest +987 -0
- package/espeak-ng-data/phonindex +0 -0
- package/espeak-ng-data/phontab +0 -0
- package/espeak-ng-data/piqd_dict +0 -0
- package/espeak-ng-data/pl_dict +0 -0
- package/espeak-ng-data/pt_dict +0 -0
- package/espeak-ng-data/py_dict +0 -0
- package/espeak-ng-data/qdb_dict +0 -0
- package/espeak-ng-data/qu_dict +0 -0
- package/espeak-ng-data/quc_dict +0 -0
- package/espeak-ng-data/qya_dict +0 -0
- package/espeak-ng-data/ro_dict +0 -0
- package/espeak-ng-data/ru_dict +0 -0
- package/espeak-ng-data/sd_dict +0 -0
- package/espeak-ng-data/shn_dict +0 -0
- package/espeak-ng-data/si_dict +0 -0
- package/espeak-ng-data/sjn_dict +0 -0
- package/espeak-ng-data/sk_dict +0 -0
- package/espeak-ng-data/sl_dict +0 -0
- package/espeak-ng-data/smj_dict +0 -0
- package/espeak-ng-data/sq_dict +0 -0
- package/espeak-ng-data/sr_dict +0 -0
- package/espeak-ng-data/sv_dict +0 -0
- package/espeak-ng-data/sw_dict +0 -0
- package/espeak-ng-data/ta_dict +0 -0
- package/espeak-ng-data/te_dict +0 -0
- package/espeak-ng-data/th_dict +0 -0
- package/espeak-ng-data/tk_dict +0 -0
- package/espeak-ng-data/tn_dict +0 -0
- package/espeak-ng-data/tr_dict +0 -0
- package/espeak-ng-data/tt_dict +0 -0
- package/espeak-ng-data/ug_dict +0 -0
- package/espeak-ng-data/uk_dict +0 -0
- package/espeak-ng-data/ur_dict +0 -0
- package/espeak-ng-data/uz_dict +0 -0
- package/espeak-ng-data/vi_dict +0 -0
- package/espeak-ng-data/voices/!v/Alex +10 -0
- package/espeak-ng-data/voices/!v/Alicia +22 -0
- package/espeak-ng-data/voices/!v/Andrea +20 -0
- package/espeak-ng-data/voices/!v/Andy +19 -0
- package/espeak-ng-data/voices/!v/Annie +17 -0
- package/espeak-ng-data/voices/!v/AnxiousAndy +19 -0
- package/espeak-ng-data/voices/!v/Demonic +65 -0
- package/espeak-ng-data/voices/!v/Denis +19 -0
- package/espeak-ng-data/voices/!v/Diogo +22 -0
- package/espeak-ng-data/voices/!v/Gene +17 -0
- package/espeak-ng-data/voices/!v/Gene2 +17 -0
- package/espeak-ng-data/voices/!v/Henrique +22 -0
- package/espeak-ng-data/voices/!v/Hugo +22 -0
- package/espeak-ng-data/voices/!v/Jacky +17 -0
- package/espeak-ng-data/voices/!v/Lee +20 -0
- package/espeak-ng-data/voices/!v/Marco +23 -0
- package/espeak-ng-data/voices/!v/Mario +17 -0
- package/espeak-ng-data/voices/!v/Michael +17 -0
- package/espeak-ng-data/voices/!v/Mike +7 -0
- package/espeak-ng-data/voices/!v/Mr serious +50 -0
- package/espeak-ng-data/voices/!v/Nguyen +16 -0
- package/espeak-ng-data/voices/!v/Reed +15 -0
- package/espeak-ng-data/voices/!v/RicishayMax +16 -0
- package/espeak-ng-data/voices/!v/RicishayMax2 +25 -0
- package/espeak-ng-data/voices/!v/RicishayMax3 +25 -0
- package/espeak-ng-data/voices/!v/Storm +23 -0
- package/espeak-ng-data/voices/!v/Tweaky +50 -0
- package/espeak-ng-data/voices/!v/UniRobot +19 -0
- package/espeak-ng-data/voices/!v/adam +6 -0
- package/espeak-ng-data/voices/!v/anika +25 -0
- package/espeak-ng-data/voices/!v/anikaRobot +26 -0
- package/espeak-ng-data/voices/!v/announcer +17 -0
- package/espeak-ng-data/voices/!v/antonio +21 -0
- package/espeak-ng-data/voices/!v/aunty +19 -0
- package/espeak-ng-data/voices/!v/belinda +20 -0
- package/espeak-ng-data/voices/!v/benjamin +11 -0
- package/espeak-ng-data/voices/!v/boris +15 -0
- package/espeak-ng-data/voices/!v/caleb +5 -0
- package/espeak-ng-data/voices/!v/croak +11 -0
- package/espeak-ng-data/voices/!v/david +8 -0
- package/espeak-ng-data/voices/!v/ed +17 -0
- package/espeak-ng-data/voices/!v/edward +10 -0
- package/espeak-ng-data/voices/!v/edward2 +10 -0
- package/espeak-ng-data/voices/!v/f1 +18 -0
- package/espeak-ng-data/voices/!v/f2 +21 -0
- package/espeak-ng-data/voices/!v/f3 +22 -0
- package/espeak-ng-data/voices/!v/f4 +18 -0
- package/espeak-ng-data/voices/!v/f5 +23 -0
- package/espeak-ng-data/voices/!v/fast +7 -0
- package/espeak-ng-data/voices/!v/grandma +17 -0
- package/espeak-ng-data/voices/!v/grandpa +14 -0
- package/espeak-ng-data/voices/!v/gustave +17 -0
- package/espeak-ng-data/voices/!v/ian +51 -0
- package/espeak-ng-data/voices/!v/iven +14 -0
- package/espeak-ng-data/voices/!v/iven2 +15 -0
- package/espeak-ng-data/voices/!v/iven3 +14 -0
- package/espeak-ng-data/voices/!v/iven4 +14 -0
- package/espeak-ng-data/voices/!v/john +50 -0
- package/espeak-ng-data/voices/!v/kaukovalta +16 -0
- package/espeak-ng-data/voices/!v/klatt +4 -0
- package/espeak-ng-data/voices/!v/klatt2 +4 -0
- package/espeak-ng-data/voices/!v/klatt3 +4 -0
- package/espeak-ng-data/voices/!v/klatt4 +4 -0
- package/espeak-ng-data/voices/!v/klatt5 +4 -0
- package/espeak-ng-data/voices/!v/klatt6 +4 -0
- package/espeak-ng-data/voices/!v/linda +20 -0
- package/espeak-ng-data/voices/!v/m1 +20 -0
- package/espeak-ng-data/voices/!v/m2 +15 -0
- package/espeak-ng-data/voices/!v/m3 +17 -0
- package/espeak-ng-data/voices/!v/m4 +17 -0
- package/espeak-ng-data/voices/!v/m5 +15 -0
- package/espeak-ng-data/voices/!v/m6 +13 -0
- package/espeak-ng-data/voices/!v/m7 +17 -0
- package/espeak-ng-data/voices/!v/m8 +16 -0
- package/espeak-ng-data/voices/!v/marcelo +17 -0
- package/espeak-ng-data/voices/!v/max +15 -0
- package/espeak-ng-data/voices/!v/michel +22 -0
- package/espeak-ng-data/voices/!v/miguel +22 -0
- package/espeak-ng-data/voices/!v/mike2 +12 -0
- package/espeak-ng-data/voices/!v/norbert +50 -0
- package/espeak-ng-data/voices/!v/pablo +52 -0
- package/espeak-ng-data/voices/!v/paul +17 -0
- package/espeak-ng-data/voices/!v/pedro +23 -0
- package/espeak-ng-data/voices/!v/quincy +20 -0
- package/espeak-ng-data/voices/!v/rob +17 -0
- package/espeak-ng-data/voices/!v/robert +17 -0
- package/espeak-ng-data/voices/!v/robosoft +26 -0
- package/espeak-ng-data/voices/!v/robosoft2 +26 -0
- package/espeak-ng-data/voices/!v/robosoft3 +26 -0
- package/espeak-ng-data/voices/!v/robosoft4 +25 -0
- package/espeak-ng-data/voices/!v/robosoft5 +25 -0
- package/espeak-ng-data/voices/!v/robosoft6 +15 -0
- package/espeak-ng-data/voices/!v/robosoft7 +25 -0
- package/espeak-ng-data/voices/!v/robosoft8 +16 -0
- package/espeak-ng-data/voices/!v/sandro +25 -0
- package/espeak-ng-data/voices/!v/shelby +18 -0
- package/espeak-ng-data/voices/!v/steph +21 -0
- package/espeak-ng-data/voices/!v/steph2 +21 -0
- package/espeak-ng-data/voices/!v/steph3 +22 -0
- package/espeak-ng-data/voices/!v/travis +23 -0
- package/espeak-ng-data/voices/!v/victor +16 -0
- package/espeak-ng-data/voices/!v/whisper +13 -0
- package/espeak-ng-data/voices/!v/whisperf +24 -0
- package/espeak-ng-data/voices/!v/zac +15 -0
- package/espeak-ng-data/yue_dict +0 -0
- package/package.json +44 -0
- package/piper-phonemize.js +95 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
Please see
|
|
4
|
+
https://github.com/csukuangfj/piper-phonemize/blob/master/nodejs-addon-examples/README.md
|
|
5
|
+
for usages.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
||Method|Support multiple threads|Minimum required node version|
|
|
9
|
+
|---|---|---|---|
|
|
10
|
+
|this package| https://github.com/nodejs/node-addon-api | No | v16|
|
|
11
|
+
|https://www.npmjs.com/package/piper-phonemize| WebAssembly | No | v18|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
|
|
3
|
+
let addon = null;
|
|
4
|
+
|
|
5
|
+
const platform = os.platform() === 'win32' ? 'win' : os.platform();
|
|
6
|
+
const arch = os.arch();
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
if (arch === 'x64') {
|
|
10
|
+
if (platform === 'win') {
|
|
11
|
+
addon = require('../piper-phonemize-win-x64/piper-phonemize.node')
|
|
12
|
+
} else if (platform === 'darwin') {
|
|
13
|
+
addon = require('../piper-phonemize-darwin-x64/piper-phonemize.node')
|
|
14
|
+
} else if (platform === 'linux') {
|
|
15
|
+
addon = require('../piper-phonemize-linux-x64/piper-phonemize.node')
|
|
16
|
+
}
|
|
17
|
+
} else if (arch === 'arm64') {
|
|
18
|
+
if (platform === 'darwin') {
|
|
19
|
+
addon = require('../piper-phonemize-darwin-arm64/piper-phonemize.node')
|
|
20
|
+
} else if (platform === 'linux') {
|
|
21
|
+
addon = require('../piper-phonemize-linux-arm64/piper-phonemize.node')
|
|
22
|
+
}
|
|
23
|
+
} else if (arch === 'ia32') {
|
|
24
|
+
if (platform === 'win') {
|
|
25
|
+
addon = require('../piper-phonemize-win-ia32/piper-phonemize.node')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} catch (error) {
|
|
29
|
+
//
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!addon) {
|
|
33
|
+
try {
|
|
34
|
+
if (arch === 'x64') {
|
|
35
|
+
if (platform === 'win') {
|
|
36
|
+
addon = require('./node_modules/piper-phonemize-win-x64/piper-phonemize.node')
|
|
37
|
+
} else if (platform === 'darwin') {
|
|
38
|
+
addon = require('./node_modules/piper-phonemize-darwin-x64/piper-phonemize.node')
|
|
39
|
+
} else if (platform === 'linux') {
|
|
40
|
+
addon = require('./node_modules/piper-phonemize-linux-x64/piper-phonemize.node')
|
|
41
|
+
}
|
|
42
|
+
} else if (arch === 'arm64') {
|
|
43
|
+
if (platform === 'darwin') {
|
|
44
|
+
addon = require('./node_modules/piper-phonemize-darwin-arm64/piper-phonemize.node')
|
|
45
|
+
} else if (platform === 'linux') {
|
|
46
|
+
addon = require('./node_modules/piper-phonemize-linux-arm64/piper-phonemize.node')
|
|
47
|
+
}
|
|
48
|
+
} else if (arch === 'ia32') {
|
|
49
|
+
if (platform === 'win') {
|
|
50
|
+
addon = require('./node_modules/piper-phonemize-win-ia32/piper-phonemize.node')
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} catch (error) {
|
|
54
|
+
//
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
module.exports = addon;
|
package/addon.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const addonStaticImport = require('./addon-static-import');
|
|
4
|
+
|
|
5
|
+
const platform = os.platform() === 'win32' ? 'win' : os.platform();
|
|
6
|
+
const arch = os.arch();
|
|
7
|
+
const platform_arch = `${platform}-${arch}`;
|
|
8
|
+
const possible_paths = [
|
|
9
|
+
'../build/Release/piper-phonemize.node',
|
|
10
|
+
'../build/Debug/piper-phonemize.node',
|
|
11
|
+
`./node_modules/piper-phonemize-${platform_arch}/piper-phonemize.node`,
|
|
12
|
+
`../piper-phonemize-${platform_arch}/piper-phonemize.node`,
|
|
13
|
+
'./piper-phonemize.node',
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
let addon = addonStaticImport;
|
|
17
|
+
|
|
18
|
+
if (!addon) {
|
|
19
|
+
for (const p of possible_paths) {
|
|
20
|
+
try {
|
|
21
|
+
addon = require(p);
|
|
22
|
+
break;
|
|
23
|
+
} catch (error) {
|
|
24
|
+
// do nothing; try the next option
|
|
25
|
+
;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = addon;
|
|
31
|
+
|
|
32
|
+
if (!addon) {
|
|
33
|
+
let addon_path =
|
|
34
|
+
`${process.env.PWD}/node_modules/piper-phonemize-${platform_arch}`;
|
|
35
|
+
const pnpmIndex = __dirname.indexOf(`node_modules${path.sep}.pnpm`);
|
|
36
|
+
if (pnpmIndex !== -1) {
|
|
37
|
+
const parts = __dirname.slice(pnpmIndex).split(path.sep);
|
|
38
|
+
parts.pop();
|
|
39
|
+
addon_path =
|
|
40
|
+
`${process.env.PWD}/${parts.join('/')}/piper-phonemize-${platform_arch}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let msg = `Could not find piper-phonemize-node. Tried\n\n ${
|
|
44
|
+
possible_paths.join('\n ')}\n`
|
|
45
|
+
if (os.platform() == 'darwin' &&
|
|
46
|
+
(!process.env.DYLD_LIBRARY_PATH ||
|
|
47
|
+
!process.env.DYLD_LIBRARY_PATH.includes(
|
|
48
|
+
`node_modules/piper-phonemize-${platform_arch}`))) {
|
|
49
|
+
msg +=
|
|
50
|
+
'Please remember to set the following environment variable and try again:\n';
|
|
51
|
+
|
|
52
|
+
msg += `export DYLD_LIBRARY_PATH=${addon_path}`;
|
|
53
|
+
|
|
54
|
+
msg += ':$DYLD_LIBRARY_PATH\n';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (os.platform() == 'linux' &&
|
|
58
|
+
(!process.env.LD_LIBRARY_PATH ||
|
|
59
|
+
!process.env.LD_LIBRARY_PATH.includes(
|
|
60
|
+
`node_modules/piper-phonemize-${platform_arch}`))) {
|
|
61
|
+
msg +=
|
|
62
|
+
'Please remember to set the following environment variable and try again:\n';
|
|
63
|
+
|
|
64
|
+
msg += `export LD_LIBRARY_PATH=${addon_path}`;
|
|
65
|
+
|
|
66
|
+
msg += ':$LD_LIBRARY_PATH\n';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
throw new Error(msg)
|
|
70
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
name Latgalian
|
|
2
|
+
language ltg
|
|
3
|
+
maintainer Valdis Vitolins <valdis.vitolins@odo.lv>
|
|
4
|
+
status testing
|
|
5
|
+
phonemes lv
|
|
6
|
+
dictionary lv
|
|
7
|
+
dictrules 2 // Setting for Latgalian pronunciation
|
|
8
|
+
words 0 2
|
|
9
|
+
pitch 64 118
|
|
10
|
+
tone 60 150 204 100 400 255 700 10 3000 255
|
|
11
|
+
stressAmp 12 10 8 8 0 0 15 16
|
|
12
|
+
stressLength 160 140 200 140 0 0 240 160
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name English (Caribbean)
|
|
2
|
+
language en-029
|
|
3
|
+
language en 10
|
|
4
|
+
|
|
5
|
+
maintainer Reece H. Dunn <msclrhd@gmail.com>
|
|
6
|
+
status mature
|
|
7
|
+
|
|
8
|
+
phonemes en-wi
|
|
9
|
+
dictrules 8
|
|
10
|
+
stressLength 175 175 175 175 220 220 250 290
|
|
11
|
+
|
|
12
|
+
replace 00 D d
|
|
13
|
+
replace 00 T t[
|
|
14
|
+
replace 00 U@ o@
|
|
15
|
+
replace 03 @ a#
|
|
16
|
+
replace 03 3 a#
|
|
17
|
+
replace 03 N n
|
|
18
|
+
|
|
19
|
+
formant 1 98 100 100
|
|
20
|
+
formant 2 98 100 100
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name English (Scotland)
|
|
2
|
+
language en-gb-scotland
|
|
3
|
+
language en 4
|
|
4
|
+
|
|
5
|
+
maintainer Reece H. Dunn <msclrhd@gmail.com>
|
|
6
|
+
status mature
|
|
7
|
+
|
|
8
|
+
phonemes en-sc
|
|
9
|
+
dictrules 2 5 6 7
|
|
10
|
+
stressLength 180 130 200 200 0 0 250 270
|
|
11
|
+
|
|
12
|
+
replace 03 @ V
|
|
13
|
+
replace 03 I i
|
|
14
|
+
replace 03 I2 i
|
|
15
|
+
replace 01 aI aI2
|
|
16
|
+
replace 02 a a/
|
|
17
|
+
replace 02 u: U
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name English (Lancaster)
|
|
2
|
+
language en-gb-x-gbclan
|
|
3
|
+
language en-gb 3
|
|
4
|
+
language en 5
|
|
5
|
+
|
|
6
|
+
maintainer Reece H. Dunn <msclrhd@gmail.com>
|
|
7
|
+
status mature
|
|
8
|
+
|
|
9
|
+
phonemes en-n
|
|
10
|
+
|
|
11
|
+
stressLength 160 150 180 180 220 220 290 290
|
|
12
|
+
|
|
13
|
+
replace 03 N n
|
|
14
|
+
replace 03 i I2
|