WIP
This commit is contained in:
parent
69b1acc1f0
commit
8d2d3617c3
|
@ -628,7 +628,7 @@ watch(convert, (newBlob) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newBlob) {
|
if (newBlob) {
|
||||||
converturl.value = { url: URL.createObjectURL(newBlob) };
|
converturl.value = { url: newBlob };
|
||||||
} else {
|
} else {
|
||||||
converturl.value = null;
|
converturl.value = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -558,6 +558,7 @@ function loadConversation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(convert, (newBlob) => {
|
watch(convert, (newBlob) => {
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
if (converturl.value && converturl.value.url) {
|
if (converturl.value && converturl.value.url) {
|
||||||
URL.revokeObjectURL(converturl.value.url);
|
URL.revokeObjectURL(converturl.value.url);
|
||||||
|
@ -565,10 +566,11 @@ watch(convert, (newBlob) => {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to revoke URL:', error);
|
console.error('Failed to revoke URL:', error);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (newBlob) {
|
if (newBlob) {
|
||||||
converturl.value = { url: URL.createObjectURL(newBlob) };
|
converturl.value = { url: newBlob };
|
||||||
} else {
|
} else {
|
||||||
converturl.value = null;
|
converturl.value = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,13 +314,12 @@ export function getNoteMenu(props: {
|
||||||
|
|
||||||
const buffers = new Uint8Array(convertdata.body._readableState.buffer[0].data).buffer;
|
const buffers = new Uint8Array(convertdata.body._readableState.buffer[0].data).buffer;
|
||||||
|
|
||||||
console.log('UArray:', buffers);
|
try {
|
||||||
|
|
||||||
const blob = new Blob([buffers], { type: contentType });
|
const blob = new Blob([buffers], { type: contentType });
|
||||||
|
|
||||||
console.log('Blob:', blob);
|
|
||||||
|
|
||||||
props.convert.value = URL.createObjectURL(blob);
|
props.convert.value = URL.createObjectURL(blob);
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Failed to create Blob or Object URL:', e);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error('API did not return audio data.');
|
console.error('API did not return audio data.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue