Documentation
¶
Overview ¶
Package model은 음성 모델의 기대값과 캐시 위치를 정한다.
받고 검증하는 일은 루트 모듈의 internal/modelfetch 가 한다. 이 패키지는 그 기계에 whisper 와 화자 분할 모델이라는 값을 먹인다. 크기와 체크섬을 고정하는 규율, Range 이어받기, 오프라인 반입은 engram 본체의 모델과 같은 것을 쓴다(ADR 0080).
Index ¶
Constants ¶
View Source
const ( EncoderName = "encoder.int8.onnx" DecoderName = "decoder.int8.onnx" TokensName = "tokens.txt" SegmentName = "segmentation.onnx" SpeakerName = "speaker-embedding.onnx" VadName = "silero_vad.onnx" )
모델 디렉토리 안에 놓이는 파일 이름이다. 크기마다 디렉토리가 다르므로 이름에 크기를 넣지 않는다. 쓰는 쪽 코드가 크기를 몰라도 된다.
View Source
const Default = Large
Default는 기본 크기다.
View Source
const EnvModelDir = "ENGRAM_MODEL_DIR"
EnvModelDir는 모델 디렉토리를 바꾸는 환경변수다. engram 본체와 같은 이름을 쓴다. 사용자가 모델을 한 곳에 모으고 싶어 할 때 변수를 둘 기억하게 하지 않는다.
Variables ¶
View Source
var ErrUnknownSize = errors.New("모르는 모델 크기")
ErrUnknownSize는 모르는 크기를 받았을 때의 오류다.
Functions ¶
Types ¶
type FileStatus ¶
type FileStatus = modelfetch.FileStatus
ModelFile과 FileStatus와 ProgressFn은 modelfetch 의 것을 그대로 쓴다.
type ModelFile ¶
type ModelFile = modelfetch.ModelFile
ModelFile과 FileStatus와 ProgressFn은 modelfetch 의 것을 그대로 쓴다.
type ProgressFn ¶
type ProgressFn = modelfetch.ProgressFn
ModelFile과 FileStatus와 ProgressFn은 modelfetch 의 것을 그대로 쓴다.
Click to show internal directories.
Click to hide internal directories.