open-agents-ai 0.103.81 → 0.103.82
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.js +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38747,9 +38747,19 @@ var init_voice = __esm({
|
|
|
38747
38747
|
* Returns status message.
|
|
38748
38748
|
*/
|
|
38749
38749
|
async setCloneVoice(audioPath) {
|
|
38750
|
-
|
|
38751
|
-
|
|
38750
|
+
let p = audioPath.trim();
|
|
38751
|
+
if (p.startsWith("'") && p.endsWith("'") || p.startsWith('"') && p.endsWith('"')) {
|
|
38752
|
+
p = p.slice(1, -1);
|
|
38752
38753
|
}
|
|
38754
|
+
p = p.replace(/\\ /g, " ");
|
|
38755
|
+
if (p.startsWith("~/") || p === "~") {
|
|
38756
|
+
p = join43(homedir12(), p.slice(1));
|
|
38757
|
+
}
|
|
38758
|
+
if (!existsSync34(p)) {
|
|
38759
|
+
return `File not found: ${p}
|
|
38760
|
+
(original input: ${audioPath})`;
|
|
38761
|
+
}
|
|
38762
|
+
audioPath = p;
|
|
38753
38763
|
const refsDir = luxttsCloneRefsDir();
|
|
38754
38764
|
if (!existsSync34(refsDir))
|
|
38755
38765
|
mkdirSync14(refsDir, { recursive: true });
|
package/package.json
CHANGED