Feat use ffmpeg static (#327)
* use ffmpeg static if valid * transcribe after decoded
This commit is contained in:
@@ -173,6 +173,7 @@ export const AudioDetail = (props: { id?: string; md5?: string }) => {
|
||||
}, [audio]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!initialized) return;
|
||||
if (!transcription) return;
|
||||
|
||||
addDblistener(onTransactionUpdate);
|
||||
@@ -192,7 +193,7 @@ export const AudioDetail = (props: { id?: string; md5?: string }) => {
|
||||
removeDbListener(onTransactionUpdate);
|
||||
EnjoyApp.whisper.removeProgressListeners();
|
||||
};
|
||||
}, [md5, transcription]);
|
||||
}, [md5, transcription, initialized]);
|
||||
|
||||
if (!audio) {
|
||||
return <LoaderSpin />;
|
||||
@@ -324,7 +325,7 @@ export const AudioDetail = (props: { id?: string; md5?: string }) => {
|
||||
|
||||
{!transcription ? (
|
||||
<div className="flex items-center space-x-4">
|
||||
<PingPoint colorClassName="bg-muted" />
|
||||
<LoaderIcon className="w-4 h-4 animate-spin" />
|
||||
<span>{t("loadingTranscription")}</span>
|
||||
</div>
|
||||
) : transcription.result ? (
|
||||
|
||||
@@ -179,6 +179,7 @@ export const VideoDetail = (props: { id?: string; md5?: string }) => {
|
||||
}, [video]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!initialized) return;
|
||||
if (!transcription) return;
|
||||
|
||||
addDblistener(onTransactionUpdate);
|
||||
@@ -198,7 +199,7 @@ export const VideoDetail = (props: { id?: string; md5?: string }) => {
|
||||
removeDbListener(onTransactionUpdate);
|
||||
EnjoyApp.whisper.removeProgressListeners();
|
||||
};
|
||||
}, [md5, transcription]);
|
||||
}, [md5, transcription, initialized]);
|
||||
|
||||
if (!video) {
|
||||
return <LoaderSpin />;
|
||||
@@ -337,7 +338,7 @@ export const VideoDetail = (props: { id?: string; md5?: string }) => {
|
||||
|
||||
{!transcription ? (
|
||||
<div className="flex items-center space-x-4">
|
||||
<PingPoint colorClassName="bg-muted" />
|
||||
<LoaderIcon className="w-4 h-4 animate-spin" />
|
||||
<span>{t("loadingTranscription")}</span>
|
||||
</div>
|
||||
) : transcription.result ? (
|
||||
|
||||
Reference in New Issue
Block a user