piper-phonemize 1.5.4 → 1.5.5

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 CHANGED
@@ -37,7 +37,7 @@ Phonemize text and return raw phoneme code points.
37
37
 
38
38
  - `text` (string): Text to phonemize
39
39
  - `voice` (string, optional): espeak-ng voice (e.g., 'en-us', 'de', 'fr'). Default: 'en-us'
40
- - Returns: Array of sentences, each containing an array of uint32 code points, or null on failure
40
+ - Returns: Array of sentences, each containing an array of int32 code points, or null on failure
41
41
 
42
42
  ### `phonemizeToString(text, voice)`
43
43
 
package/index.js CHANGED
@@ -68,7 +68,7 @@ function getVersion() {
68
68
  *
69
69
  * @param {string} text - Text to phonemize
70
70
  * @param {string} [voice='en-us'] - espeak-ng voice (e.g., 'en-us', 'de', 'fr')
71
- * @returns {Array<Array<number>>|null} Array of sentences, each containing phoneme code points (uint32), or null on failure
71
+ * @returns {Array<Array<number>>|null} Array of sentences, each containing phoneme code points (int32), or null on failure
72
72
  */
73
73
  function phonemize(text, voice) {
74
74
  ensureInitialized();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piper-phonemize",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Phonemization library for Piper text-to-speech using espeak-ng, compiled to WebAssembly",
5
5
  "main": "index.js",
6
6
  "scripts": {
Binary file
@@ -72,7 +72,7 @@ function getVersionStr() {
72
72
  *
73
73
  * @param {string} text - Text to phonemize
74
74
  * @param {string} [voice='en-us'] - espeak-ng voice (e.g., 'en-us', 'de', 'fr')
75
- * @returns {Array<Array<number>>|null} Array of sentences, each containing phoneme code points (uint32), or null on failure
75
+ * @returns {Array<Array<number>>|null} Array of sentences, each containing phoneme code points (int32), or null on failure
76
76
  */
77
77
  function phonemize(text, voice) {
78
78
  if (!Module) {
@@ -117,10 +117,10 @@ function phonemize(text, voice) {
117
117
  continue;
118
118
  }
119
119
 
120
- // Read uint32 array from WASM heap
120
+ // Read int32 array from WASM heap
121
121
  const phonemes = [];
122
122
  for (let j = 0; j < numPhonemes; j++) {
123
- phonemes.push(Module.HEAPU32[(phonemesPtr >> 2) + j]);
123
+ phonemes.push(Module.HEAP32[(phonemesPtr >> 2) + j]);
124
124
  }
125
125
  sentences.push(phonemes);
126
126
  }