Fix: handle echogarden align error (#620)
* may re-generate when "no matching voice found" * may regenerate if the original text has not-matching voice * specify language to avoid "no matching voice found"
This commit is contained in:
@@ -34,7 +34,7 @@ export const MediaLoadingModal = () => {
|
||||
|
||||
return (
|
||||
<AlertDialog open={!decoded || !Boolean(transcription?.result?.timeline)}>
|
||||
<AlertDialogOverlay className="z-[100]" />
|
||||
<AlertDialogOverlay className="" />
|
||||
<AlertDialogContent className="z-[100]">
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{t("preparingAudio")}</AlertDialogTitle>
|
||||
@@ -55,9 +55,7 @@ export const MediaLoadingModal = () => {
|
||||
<XCircleIcon className="w-4 h-4 text-destructive" />
|
||||
</div>
|
||||
<div className="select-text">
|
||||
<div className="mb-2">
|
||||
{decodeError}
|
||||
</div>
|
||||
<div className="mb-2">{decodeError}</div>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
{t("failedToDecodeWaveform")}:{" "}
|
||||
<span className="break-all ">{media?.src}</span>
|
||||
@@ -97,12 +95,17 @@ export const MediaLoadingModal = () => {
|
||||
<div className="inline">
|
||||
<span>{t("notTranscribedYet")}</span>
|
||||
{decoded && (
|
||||
<Button
|
||||
onClick={generateTranscription}
|
||||
className="ml-4"
|
||||
size="sm"
|
||||
>
|
||||
{t("transcribe")}
|
||||
<Button asChild className="ml-4" size="sm">
|
||||
<a
|
||||
className="cursor-pointer"
|
||||
onClick={() =>
|
||||
generateTranscription({
|
||||
originalText: "",
|
||||
})
|
||||
}
|
||||
>
|
||||
{t("regenerate")}
|
||||
</a>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@ export const TranscriptionForm = (props: {
|
||||
const handleSave = async () => {
|
||||
setSubmiting(true);
|
||||
try {
|
||||
await generateTranscription(content);
|
||||
await generateTranscription({ originalText: content });
|
||||
setOpen(false);
|
||||
} catch (e) {
|
||||
toast.error(e.message);
|
||||
|
||||
@@ -144,7 +144,13 @@ export const MediaTranscription = () => {
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>{t("cancel")}</AlertDialogCancel>
|
||||
<AlertDialogAction onClick={() => generateTranscription("")}>
|
||||
<AlertDialogAction
|
||||
onClick={() =>
|
||||
generateTranscription({
|
||||
originalText: "",
|
||||
})
|
||||
}
|
||||
>
|
||||
{t("transcribe")}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
|
||||
@@ -284,7 +284,11 @@ export const AssistantMessageComponent = (props: {
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
|
||||
<Sheet open={shadowing} onOpenChange={(value) => setShadowing(value)}>
|
||||
<Sheet
|
||||
modal={false}
|
||||
open={shadowing}
|
||||
onOpenChange={(value) => setShadowing(value)}
|
||||
>
|
||||
<SheetContent
|
||||
side="bottom"
|
||||
className="h-screen p-0"
|
||||
|
||||
Reference in New Issue
Block a user