Add Phase 2 fixtures and compatibility tests
This commit is contained in:
@@ -271,15 +271,417 @@ func TestNormalizationCategoryPreservation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizationSummaryCounts(t *testing.T) {
|
||||
func TestNormalizationGoldenBareArrayTranscript(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/bare_array_transcript.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/bare_array_transcript.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenObjectWithSegmentsTranscript(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/object_with_segments_transcript.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/object_with_segments_transcript.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenTranscriptWithCategories(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/transcript_with_categories.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/transcript_with_categories.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenTranscriptWithOriginalIDs(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/transcript_with_original_ids.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/transcript_with_original_ids.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenSameSpeakerMerge(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/transcript_same_speaker_merge.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/transcript_same_speaker_merge.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenEllipsisMerge(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/transcript_ellipsis_merge.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/transcript_ellipsis_merge.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func TestNormalizationGoldenDifferentSpeakersNoMerge(t *testing.T) {
|
||||
config := NormalizationConfig{
|
||||
MaxSegmentGap: 2.0,
|
||||
EllipsisGap: 1.0,
|
||||
MaxSegmentDuration: 60.0,
|
||||
MaxSegmentTokens: 100,
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
raw, err := os.ReadFile("testdata/transcript_different_speakers_no_merge.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test fixture: %v", err)
|
||||
}
|
||||
|
||||
transcript, err := schema.ParseSourceTranscriptJSON(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse source transcript: %v", err)
|
||||
}
|
||||
|
||||
converted := &schema.Transcript{
|
||||
Segments: make([]schema.Segment, len(transcript.Segments)),
|
||||
}
|
||||
for i, s := range transcript.Segments {
|
||||
id := i + 1
|
||||
if s.ID != nil {
|
||||
id = *s.ID
|
||||
}
|
||||
converted.Segments[i] = schema.Segment{
|
||||
ID: id,
|
||||
Speaker: s.Speaker,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Text: s.Text,
|
||||
Categories: s.Categories,
|
||||
}
|
||||
}
|
||||
|
||||
normalized, _ := normalizer.Normalize(converted)
|
||||
|
||||
// Compare with golden output semantically
|
||||
expectedRaw, err := os.ReadFile("testdata/transcript_different_speakers_no_merge.golden.json")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read golden fixture: %v", err)
|
||||
}
|
||||
|
||||
var expectedTranscript schema.Transcript
|
||||
if err := schema.ParseTranscriptJSON(expectedRaw); err != nil {
|
||||
t.Fatalf("failed to parse golden transcript: %v", err)
|
||||
}
|
||||
|
||||
assertTranscriptsEqual(t, normalized, &expectedTranscript)
|
||||
}
|
||||
|
||||
func assertTranscriptsEqual(t *testing.T, actual, expected *schema.Transcript) {
|
||||
t.Helper()
|
||||
|
||||
if len(actual.Segments) != len(expected.Segments) {
|
||||
t.Errorf("segment count mismatch: expected %d, got %d", len(expected.Segments), len(actual.Segments))
|
||||
return
|
||||
}
|
||||
|
||||
for i := range actual.Segments {
|
||||
a := actual.Segments[i]
|
||||
e := expected.Segments[i]
|
||||
|
||||
if a.ID != e.ID {
|
||||
t.Errorf("segment %d: ID mismatch: expected %d, got %d", i, e.ID, a.ID)
|
||||
}
|
||||
if a.Speaker != e.Speaker {
|
||||
t.Errorf("segment %d: speaker mismatch: expected %q, got %q", i, e.Speaker, a.Speaker)
|
||||
}
|
||||
if a.Start != e.Start {
|
||||
t.Errorf("segment %d: start mismatch: expected %f, got %f", i, e.Start, a.Start)
|
||||
}
|
||||
if a.End != e.End {
|
||||
t.Errorf("segment %d: end mismatch: expected %f, got %f", i, e.End, a.End)
|
||||
}
|
||||
if a.Text != e.Text {
|
||||
t.Errorf("segment %d: text mismatch: expected %q, got %q", i, e.Text, a.Text)
|
||||
}
|
||||
if len(a.Categories) != len(e.Categories) {
|
||||
t.Errorf("segment %d: categories count mismatch: expected %d, got %d", i, len(e.Categories), len(a.Categories))
|
||||
continue
|
||||
}
|
||||
for j, cat := range a.Categories {
|
||||
if j >= len(e.Categories) || cat != e.Categories[j] {
|
||||
t.Errorf("segment %d: category %d mismatch: expected %q, got %q", i, j, e.Categories[j], cat)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
normalizer := NewNormalizer(config)
|
||||
|
||||
transcript := &schema.Transcript{
|
||||
Segments: []schema.Segment{
|
||||
{ID: 1, Speaker: "Alice", Start: 0.0, End: 1.0, Text: "Hello"},
|
||||
|
||||
19
internal/core/normalization/testdata/bare_array_transcript.golden.json
vendored
Normal file
19
internal/core/normalization/testdata/bare_array_transcript.golden.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.5,
|
||||
"text": "Hello world."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.5,
|
||||
"text": "Hi there.",
|
||||
"categories": [
|
||||
"greeting"
|
||||
]
|
||||
}
|
||||
]
|
||||
17
internal/core/normalization/testdata/bare_array_transcript.json
vendored
Normal file
17
internal/core/normalization/testdata/bare_array_transcript.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.5,
|
||||
"text": "Hello world."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.5,
|
||||
"text": "Hi there.",
|
||||
"categories": ["greeting"]
|
||||
}
|
||||
]
|
||||
19
internal/core/normalization/testdata/comprehensive_glossary.yaml
vendored
Normal file
19
internal/core/normalization/testdata/comprehensive_glossary.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
glossary:
|
||||
- name: Jesters
|
||||
category: faction
|
||||
summary: A faction name.
|
||||
aliases:
|
||||
- Jester
|
||||
- Jest
|
||||
- name: Popov
|
||||
category: character
|
||||
summary: A character name.
|
||||
aliases:
|
||||
- Hrank
|
||||
- Pop
|
||||
- name: Audita
|
||||
category: system
|
||||
summary: The transcript polishing system.
|
||||
aliases:
|
||||
- Audit
|
||||
- Auditor
|
||||
19
internal/core/normalization/testdata/object_with_segments_transcript.golden.json
vendored
Normal file
19
internal/core/normalization/testdata/object_with_segments_transcript.golden.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.5,
|
||||
"text": "Hello world."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.5,
|
||||
"text": "Hi there.",
|
||||
"categories": [
|
||||
"greeting"
|
||||
]
|
||||
}
|
||||
]
|
||||
19
internal/core/normalization/testdata/object_with_segments_transcript.json
vendored
Normal file
19
internal/core/normalization/testdata/object_with_segments_transcript.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"segments": [
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.5,
|
||||
"text": "Hello world."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.5,
|
||||
"text": "Hi there.",
|
||||
"categories": ["greeting"]
|
||||
}
|
||||
]
|
||||
}
|
||||
16
internal/core/normalization/testdata/transcript_different_speakers_no_merge.golden.json
vendored
Normal file
16
internal/core/normalization/testdata/transcript_different_speakers_no_merge.golden.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 1.5,
|
||||
"end": 2.5,
|
||||
"text": "Hi"
|
||||
}
|
||||
]
|
||||
16
internal/core/normalization/testdata/transcript_different_speakers_no_merge.json
vendored
Normal file
16
internal/core/normalization/testdata/transcript_different_speakers_no_merge.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 1.5,
|
||||
"end": 2.5,
|
||||
"text": "Hi"
|
||||
}
|
||||
]
|
||||
9
internal/core/normalization/testdata/transcript_ellipsis_merge.golden.json
vendored
Normal file
9
internal/core/normalization/testdata/transcript_ellipsis_merge.golden.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 3.0,
|
||||
"text": "Hello... world"
|
||||
}
|
||||
]
|
||||
16
internal/core/normalization/testdata/transcript_ellipsis_merge.json
vendored
Normal file
16
internal/core/normalization/testdata/transcript_ellipsis_merge.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Alice",
|
||||
"start": 2.0,
|
||||
"end": 3.0,
|
||||
"text": "world"
|
||||
}
|
||||
]
|
||||
9
internal/core/normalization/testdata/transcript_same_speaker_merge.golden.json
vendored
Normal file
9
internal/core/normalization/testdata/transcript_same_speaker_merge.golden.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 2.5,
|
||||
"text": "Hello world"
|
||||
}
|
||||
]
|
||||
16
internal/core/normalization/testdata/transcript_same_speaker_merge.json
vendored
Normal file
16
internal/core/normalization/testdata/transcript_same_speaker_merge.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Alice",
|
||||
"start": 1.2,
|
||||
"end": 2.2,
|
||||
"text": "world"
|
||||
}
|
||||
]
|
||||
24
internal/core/normalization/testdata/transcript_with_categories.golden.json
vendored
Normal file
24
internal/core/normalization/testdata/transcript_with_categories.golden.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello world.",
|
||||
"categories": [
|
||||
"greeting",
|
||||
"opening"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.0,
|
||||
"text": "Hi there.",
|
||||
"categories": [
|
||||
"response",
|
||||
"opening"
|
||||
]
|
||||
}
|
||||
]
|
||||
18
internal/core/normalization/testdata/transcript_with_categories.json
vendored
Normal file
18
internal/core/normalization/testdata/transcript_with_categories.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello world.",
|
||||
"categories": ["greeting", "opening"]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"speaker": "Bob",
|
||||
"start": 2.0,
|
||||
"end": 3.0,
|
||||
"text": "Hi there.",
|
||||
"categories": ["response", "opening"]
|
||||
}
|
||||
]
|
||||
9
internal/core/normalization/testdata/transcript_with_original_ids.golden.json
vendored
Normal file
9
internal/core/normalization/testdata/transcript_with_original_ids.golden.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 2.5,
|
||||
"text": "Hello world"
|
||||
}
|
||||
]
|
||||
16
internal/core/normalization/testdata/transcript_with_original_ids.json
vendored
Normal file
16
internal/core/normalization/testdata/transcript_with_original_ids.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 10,
|
||||
"speaker": "Alice",
|
||||
"start": 0.0,
|
||||
"end": 1.0,
|
||||
"text": "Hello"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"speaker": "Alice",
|
||||
"start": 1.5,
|
||||
"end": 2.5,
|
||||
"text": "world"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user