@onjmin/dtm 0.1.84 → 0.1.85
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/dist/index.d.mts +88 -4
- package/dist/index.d.ts +88 -4
- package/dist/index.js +691 -84
- package/dist/index.mjs +691 -84
- package/dist/voice-worker.js +13 -4
- package/package.json +1 -1
package/dist/voice-worker.js
CHANGED
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
}
|
|
541
541
|
return p;
|
|
542
542
|
};
|
|
543
|
-
var renderAlias = async (alias, pitch, durationMs, vibrato) => {
|
|
543
|
+
var renderAlias = async (alias, pitch, durationMs, vibrato, gender, breathiness) => {
|
|
544
544
|
if (!bank) return null;
|
|
545
545
|
const pcm = await getPcm(alias);
|
|
546
546
|
if (!pcm || pcm.length === 0) return null;
|
|
@@ -552,7 +552,9 @@
|
|
|
552
552
|
pcm,
|
|
553
553
|
pitch: vibrato ? vibratoPitchCurve(targetHz, lead.preMs) : targetHz,
|
|
554
554
|
durationMs,
|
|
555
|
-
...lead
|
|
555
|
+
...lead,
|
|
556
|
+
gender,
|
|
557
|
+
breathiness
|
|
556
558
|
});
|
|
557
559
|
if (audio) return { pcm: audio, preSec: lead.preMs / 1e3, rate: 1 };
|
|
558
560
|
}
|
|
@@ -584,9 +586,16 @@
|
|
|
584
586
|
return;
|
|
585
587
|
}
|
|
586
588
|
if (msg.type === "render") {
|
|
587
|
-
const { id, alias, pitch, durationMs, vibrato } = msg;
|
|
589
|
+
const { id, alias, pitch, durationMs, vibrato, gender, breathiness } = msg;
|
|
588
590
|
try {
|
|
589
|
-
const out = await renderAlias(
|
|
591
|
+
const out = await renderAlias(
|
|
592
|
+
alias,
|
|
593
|
+
pitch,
|
|
594
|
+
durationMs,
|
|
595
|
+
vibrato,
|
|
596
|
+
gender,
|
|
597
|
+
breathiness
|
|
598
|
+
);
|
|
590
599
|
if (out) {
|
|
591
600
|
wself.postMessage(
|
|
592
601
|
{
|
package/package.json
CHANGED