File size: 266 Bytes
01115c6
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from dataclasses import dataclass
from typing import List, Tuple

import torch


@dataclass
class Segment:
    """A segment of speech with text, speaker, and audio."""
    speaker: int
    text: str
    # (num_samples,), sample_rate = 24_000
    audio: torch.Tensor