mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 15:44:28 +00:00
feat(transcript): detect Chinese script for Auto (#563)
This commit is contained in:
@@ -121,7 +121,7 @@ apps/web/e2e/
|
||||
| Upload a txt file, wait for transcode, and create a comment with draw | `tests/file/txt-draw-comment.spec.ts` |
|
||||
| Upload an image file, wait for transcode, and create a comment with draw | `tests/file/image-draw-comment.spec.ts` |
|
||||
| Upload a video file, wait for transcode, and create a comment with draw at a non-zero timestamp | `tests/file/video-draw-comment.spec.ts` |
|
||||
| Read and search saved video transcripts, resize the desktop panel, jump to a segment, pause and resume playback following through manual scrolling and sync, and check mobile and version-stack behavior | `tests/file/view-transcript.spec.ts` |
|
||||
| Read and search saved video transcripts, switch to Traditional Chinese, resize the desktop panel, jump to a segment, pause and resume playback following through manual scrolling and sync, and check mobile and version-stack behavior | `tests/file/view-transcript.spec.ts` |
|
||||
| Edit video transcript text inline, verify playback pauses and timestamps survive a blank edit, retry a failed save, and check reviewer permissions | `tests/file/view-transcript.spec.ts` |
|
||||
| Upload an audio file, wait for transcode, and create a comment at a non-zero timestamp | `tests/file/audio-timestamp-comment.spec.ts` |
|
||||
| Create internal and public comments, verify internal comments are hidden on public share links | `tests/file/internal-comment-and-edit.spec.ts` |
|
||||
|
||||
@@ -50,6 +50,15 @@ test('reads, searches and follows a saved transcript in the video player', async
|
||||
segments: { create: { position: 0, startMs: 0, endMs: 700, text: '你好。' } },
|
||||
},
|
||||
})
|
||||
await prisma.assetTranscript.create({
|
||||
data: {
|
||||
assetId: fileId,
|
||||
language: 'zh-Hant',
|
||||
model: 'whisper-tiny',
|
||||
workflowTaskId: 'auto-traditional-test',
|
||||
segments: { create: { position: 0, startMs: 0, endMs: 700, text: '這是轉錄。' } },
|
||||
},
|
||||
})
|
||||
|
||||
await page.goto(`/projects/${projectId}/files/${fileId}`)
|
||||
const toggle = page.getByRole('button', { name: 'Show transcript' })
|
||||
@@ -218,9 +227,13 @@ test('reads, searches and follows a saved transcript in the video player', async
|
||||
await expect(closingWord).toHaveAttribute('aria-current', 'true')
|
||||
await expect(video).toHaveJSProperty('paused', true)
|
||||
|
||||
await panel.getByRole('combobox', { name: 'Language' }).selectOption('zh')
|
||||
const language = panel.getByRole('combobox', { name: 'Language' })
|
||||
await language.selectOption('zh')
|
||||
await expect(panel.getByText('你好。')).toBeVisible()
|
||||
await expect(last).toHaveCount(0)
|
||||
await language.selectOption({ label: 'Chinese (Traditional)' })
|
||||
await expect(language).toHaveValue('zh-Hant')
|
||||
await expect(panel.getByText('這是轉錄。')).toBeVisible()
|
||||
await dragDivider(divider, 64)
|
||||
await expect(panel).toHaveCSS('width', '448px')
|
||||
await panel.getByRole('button', { name: 'Close transcript' }).click()
|
||||
|
||||
Reference in New Issue
Block a user