mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(core): call real endpoint for audio transcription (#11139)
fix AF-2359
This commit is contained in:
@@ -6,12 +6,15 @@ import {
|
||||
|
||||
export const TranscriptionBlockFlavour = 'affine:transcription';
|
||||
|
||||
const defaultProps: TranscriptionBlockProps = {
|
||||
transcription: {},
|
||||
jobId: undefined,
|
||||
createdBy: undefined, // the user id of the creator
|
||||
};
|
||||
|
||||
export const TranscriptionBlockSchema = defineBlockSchema({
|
||||
flavour: TranscriptionBlockFlavour,
|
||||
props: () => ({
|
||||
transcription: {},
|
||||
jobId: '',
|
||||
}),
|
||||
props: () => defaultProps,
|
||||
metadata: {
|
||||
version: 1,
|
||||
role: 'attachment-viewer',
|
||||
@@ -23,7 +26,8 @@ export const TranscriptionBlockSchema = defineBlockSchema({
|
||||
|
||||
export type TranscriptionBlockProps = {
|
||||
transcription: Record<string, any>;
|
||||
jobId: string;
|
||||
jobId?: string;
|
||||
createdBy?: string;
|
||||
};
|
||||
|
||||
export class TranscriptionBlockModel extends BlockModel<TranscriptionBlockProps> {}
|
||||
|
||||
Reference in New Issue
Block a user