specify target when generate azure token
This commit is contained in:
@@ -95,7 +95,10 @@ export const AudioDetail = (props: { id?: string; md5?: string }) => {
|
||||
setTranscribing(true);
|
||||
setTranscribingProgress(0);
|
||||
try {
|
||||
const { engine, model, result } = await transcribe(audio.src);
|
||||
const { engine, model, result } = await transcribe(audio.src, {
|
||||
targetId: audio.id,
|
||||
targetType: "Audio",
|
||||
});
|
||||
await EnjoyApp.transcriptions.update(transcription.id, {
|
||||
state: "finished",
|
||||
result,
|
||||
|
||||
@@ -252,10 +252,9 @@ export const AudiosComponent = () => {
|
||||
onClick={async () => {
|
||||
if (!transcribing) return;
|
||||
|
||||
transcribe({
|
||||
mediaId: transcribing.id,
|
||||
mediaSrc: transcribing.src,
|
||||
mediaType: "Audio",
|
||||
transcribe(transcribing.src, {
|
||||
targetId: transcribing.id,
|
||||
targetType: "Audio",
|
||||
}).finally(() => {
|
||||
setTranscribing(null);
|
||||
});
|
||||
|
||||
@@ -91,7 +91,10 @@ export const VideoDetail = (props: { id?: string; md5?: string }) => {
|
||||
setTranscribing(true);
|
||||
setTranscribingProgress(0);
|
||||
try {
|
||||
const { engine, model, result } = await transcribe(video.src);
|
||||
const { engine, model, result } = await transcribe(video.src, {
|
||||
targetId: video.id,
|
||||
targetType: "Video",
|
||||
});
|
||||
await EnjoyApp.transcriptions.update(transcription.id, {
|
||||
state: "finished",
|
||||
result,
|
||||
|
||||
@@ -252,10 +252,9 @@ export const VideosComponent = () => {
|
||||
onClick={async () => {
|
||||
if (!transcribing) return;
|
||||
|
||||
transcribe({
|
||||
mediaId: transcribing.id,
|
||||
mediaSrc: transcribing.src,
|
||||
mediaType: "Video",
|
||||
transcribe(transcribing.src, {
|
||||
targetId: transcribing.id,
|
||||
targetType: "Video",
|
||||
}).finally(() => {
|
||||
setTranscribing(null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user