adapter

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Create Dev Instance

aws ec2 run-instances \
  --image-id ami-05f4737ce5776c55b \
  --instance-type g6e.xlarge \
  --key-name GNG_Mac \
  --associate-public-ip-address \
  --security-group-ids sg-0207014882af476de \
  --subnet-id subnet-57a4572f \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=Dataset-Train-dev}]'
 # --iam-instance-profile Name=YourIAMRole
 # --block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=100}' \
 

{ "Groups": [], "Instances": [ { "AmiLaunchIndex": 0, "ImageId": "ami-05f4737ce5776c55b", "InstanceId": "i-0dfbdae13535c9d24", "InstanceType": "g6e.xlarge", "KeyName": "GNG_Mac", "LaunchTime": "2025-04-23T17:11:52.000Z", "Monitoring": { "State": "disabled" }, "Placement": { "AvailabilityZone": "us-west-2a", "GroupName": "", "Tenancy": "default" }, "PrivateDnsName": "ip-172-31-26-35.us-west-2.compute.internal", "PrivateIpAddress": "172.31.26.35", "ProductCodes": [], "PublicDnsName": "", "State": { "Code": 0, "Name": "pending" }, "StateTransitionReason": "", "SubnetId": "subnet-57a4572f", "VpcId": "vpc-4371173b", "Architecture": "x86_64", "BlockDeviceMappings": [], "ClientToken": "937920d1-f3c8-4456-a801-a5fffc361de5", "EbsOptimized": false, "EnaSupport": true, "Hypervisor": "xen", "NetworkInterfaces": [ { "Attachment": { "AttachTime": "2025-04-23T17:11:52.000Z", "AttachmentId": "eni-attach-0b232025b1daa26d7", "DeleteOnTermination": true, "DeviceIndex": 0, "Status": "attaching", "NetworkCardIndex": 0 }, "Description": "", "Groups": [ { "GroupName": "launch-wizard-5", "GroupId": "sg-0207014882af476de" } ], "Ipv6Addresses": [], "MacAddress": "02:20:e2:4e:cb:5f", "NetworkInterfaceId": "eni-07cced74ae0b4e316", "OwnerId": "078432969830", "PrivateDnsName": "ip-172-31-26-35.us-west-2.compute.internal", "PrivateIpAddress": "172.31.26.35", "PrivateIpAddresses": [ { "Primary": true, "PrivateDnsName": "ip-172-31-26-35.us-west-2.compute.internal", "PrivateIpAddress": "172.31.26.35" } ], "SourceDestCheck": true, "Status": "in-use", "SubnetId": "subnet-57a4572f", "VpcId": "vpc-4371173b", "InterfaceType": "interface" } ], "RootDeviceName": "/dev/sda1", "RootDeviceType": "ebs", "SecurityGroups": [ { "GroupName": "launch-wizard-5", "GroupId": "sg-0207014882af476de" } ], "SourceDestCheck": true, "StateReason": { "Code": "pending", "Message": "pending" }, "Tags": [ { "Key": "Name", "Value": "Dataset-Train-dev" } ], "VirtualizationType": "hvm", "CpuOptions": { "CoreCount": 2, "ThreadsPerCore": 2 }, "CapacityReservationSpecification": { "CapacityReservationPreference": "open" }, "MetadataOptions": { "State": "pending", "HttpTokens": "optional", "HttpPutResponseHopLimit": 1, "HttpEndpoint": "enabled", "HttpProtocolIpv6": "disabled", "InstanceMetadataTags": "disabled" }, "EnclaveOptions": { "Enabled": false }, "BootMode": "uefi-preferred", "PrivateDnsNameOptions": { "HostnameType": "ip-name", "EnableResourceNameDnsARecord": false, "EnableResourceNameDnsAAAARecord": false }, "MaintenanceOptions": { "AutoRecovery": "default" }, "CurrentInstanceBootMode": "uefi" } ], "OwnerId": "078432969830", "ReservationId": "r-0338aeed5d925198f" }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SilencePruner

func SilencePruner(ctx context.Context, threshold int, conn db.DBAdapter) *log.Status

Types

type SilenceRec

type SilenceRec struct {
	ScriptId    int64
	BookId      string
	ChapterNum  int
	VerseStr    string
	ScriptEndTS float64
	WordId      int64
	WordSeq     int
	BeginTS     float64
	EndTS       float64
	LastWord    bool
	Duration    float64
	Silence     float64
}

type TrainAdapter

type TrainAdapter struct {
	// contains filtered or unexported fields
}

func NewTrainAdapter

func NewTrainAdapter(ctx context.Context, conn db.DBAdapter, langISO string, train req.MMSAdapter) TrainAdapter

func (*TrainAdapter) HasModel

func (t *TrainAdapter) HasModel() bool

func (*TrainAdapter) Train

func (t *TrainAdapter) Train(files []generic.InputFile) *log.Status

func (*TrainAdapter) VerifyTrained added in v1.2.0

func (t *TrainAdapter) VerifyTrained(since time.Time) *log.Status

VerifyTrained checks that Train really produced an adapter: the adapter file must exist, be larger than 1 MB, and have been written at or after since (the time Train was started). Train returns nil without training when there are no audio files, and a stale adapter left in the local directory must never be published as a newly trained model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL