implement simple tui with humans data

This commit is contained in:
talksik
2025-10-27 15:18:32 -07:00
parent 8ed2d701db
commit dd0c83c22c
31 changed files with 11361 additions and 65 deletions
+349
View File
@@ -0,0 +1,349 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.1
// protoc v5.28.3
// source: helios/speech/speech.proto
package pbspeech
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetUploadUrlRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
ContentLength int64 `protobuf:"varint,2,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
}
func (x *GetUploadUrlRequest) Reset() {
*x = GetUploadUrlRequest{}
mi := &file_helios_speech_speech_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUploadUrlRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUploadUrlRequest) ProtoMessage() {}
func (x *GetUploadUrlRequest) ProtoReflect() protoreflect.Message {
mi := &file_helios_speech_speech_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUploadUrlRequest.ProtoReflect.Descriptor instead.
func (*GetUploadUrlRequest) Descriptor() ([]byte, []int) {
return file_helios_speech_speech_proto_rawDescGZIP(), []int{0}
}
func (x *GetUploadUrlRequest) GetContentType() string {
if x != nil {
return x.ContentType
}
return ""
}
func (x *GetUploadUrlRequest) GetContentLength() int64 {
if x != nil {
return x.ContentLength
}
return 0
}
type GetUploadUrlResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Reference id to the object
ObjectId string `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
// Make a PUT request to this url with the content
UploadUrl string `protobuf:"bytes,2,opt,name=upload_url,json=uploadUrl,proto3" json:"upload_url,omitempty"`
// Use these headers in the upload PUT request
UploadHeaders map[string]string `protobuf:"bytes,3,rep,name=upload_headers,json=uploadHeaders,proto3" json:"upload_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *GetUploadUrlResponse) Reset() {
*x = GetUploadUrlResponse{}
mi := &file_helios_speech_speech_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUploadUrlResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUploadUrlResponse) ProtoMessage() {}
func (x *GetUploadUrlResponse) ProtoReflect() protoreflect.Message {
mi := &file_helios_speech_speech_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUploadUrlResponse.ProtoReflect.Descriptor instead.
func (*GetUploadUrlResponse) Descriptor() ([]byte, []int) {
return file_helios_speech_speech_proto_rawDescGZIP(), []int{1}
}
func (x *GetUploadUrlResponse) GetObjectId() string {
if x != nil {
return x.ObjectId
}
return ""
}
func (x *GetUploadUrlResponse) GetUploadUrl() string {
if x != nil {
return x.UploadUrl
}
return ""
}
func (x *GetUploadUrlResponse) GetUploadHeaders() map[string]string {
if x != nil {
return x.UploadHeaders
}
return nil
}
type TranscribeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ObjectId string `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
// Whether or not to use deepgram smart format
SmartFormat bool `protobuf:"varint,2,opt,name=smart_format,json=smartFormat,proto3" json:"smart_format,omitempty"`
}
func (x *TranscribeRequest) Reset() {
*x = TranscribeRequest{}
mi := &file_helios_speech_speech_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TranscribeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TranscribeRequest) ProtoMessage() {}
func (x *TranscribeRequest) ProtoReflect() protoreflect.Message {
mi := &file_helios_speech_speech_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TranscribeRequest.ProtoReflect.Descriptor instead.
func (*TranscribeRequest) Descriptor() ([]byte, []int) {
return file_helios_speech_speech_proto_rawDescGZIP(), []int{2}
}
func (x *TranscribeRequest) GetObjectId() string {
if x != nil {
return x.ObjectId
}
return ""
}
func (x *TranscribeRequest) GetSmartFormat() bool {
if x != nil {
return x.SmartFormat
}
return false
}
type TranscribeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FullText string `protobuf:"bytes,1,opt,name=full_text,json=fullText,proto3" json:"full_text,omitempty"`
}
func (x *TranscribeResponse) Reset() {
*x = TranscribeResponse{}
mi := &file_helios_speech_speech_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TranscribeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TranscribeResponse) ProtoMessage() {}
func (x *TranscribeResponse) ProtoReflect() protoreflect.Message {
mi := &file_helios_speech_speech_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TranscribeResponse.ProtoReflect.Descriptor instead.
func (*TranscribeResponse) Descriptor() ([]byte, []int) {
return file_helios_speech_speech_proto_rawDescGZIP(), []int{3}
}
func (x *TranscribeResponse) GetFullText() string {
if x != nil {
return x.FullText
}
return ""
}
var File_helios_speech_speech_proto protoreflect.FileDescriptor
var file_helios_speech_speech_proto_rawDesc = []byte{
0x0a, 0x1a, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x2f,
0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x65,
0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x22, 0x5f, 0x0a, 0x13, 0x47,
0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf3, 0x01, 0x0a,
0x14, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x75, 0x72, 0x6c,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72,
0x6c, 0x12, 0x5d, 0x0a, 0x0e, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64,
0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x65, 0x6c, 0x69,
0x6f, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c,
0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55,
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x0d, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
0x1a, 0x40, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x22, 0x53, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6d, 0x61, 0x72,
0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x31, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a,
0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x32, 0xbb, 0x01, 0x0a, 0x0d, 0x53,
0x70, 0x65, 0x65, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x0c,
0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x2e, 0x68,
0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x74,
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68,
0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x72,
0x69, 0x62, 0x65, 0x12, 0x20, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x65,
0x65, 0x63, 0x68, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x73,
0x70, 0x65, 0x65, 0x63, 0x68, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x79, 0x2d, 0x6c, 0x69, 0x76,
0x65, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x3b,
0x70, 0x62, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_helios_speech_speech_proto_rawDescOnce sync.Once
file_helios_speech_speech_proto_rawDescData = file_helios_speech_speech_proto_rawDesc
)
func file_helios_speech_speech_proto_rawDescGZIP() []byte {
file_helios_speech_speech_proto_rawDescOnce.Do(func() {
file_helios_speech_speech_proto_rawDescData = protoimpl.X.CompressGZIP(file_helios_speech_speech_proto_rawDescData)
})
return file_helios_speech_speech_proto_rawDescData
}
var file_helios_speech_speech_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_helios_speech_speech_proto_goTypes = []any{
(*GetUploadUrlRequest)(nil), // 0: helios.speech.GetUploadUrlRequest
(*GetUploadUrlResponse)(nil), // 1: helios.speech.GetUploadUrlResponse
(*TranscribeRequest)(nil), // 2: helios.speech.TranscribeRequest
(*TranscribeResponse)(nil), // 3: helios.speech.TranscribeResponse
nil, // 4: helios.speech.GetUploadUrlResponse.UploadHeadersEntry
}
var file_helios_speech_speech_proto_depIdxs = []int32{
4, // 0: helios.speech.GetUploadUrlResponse.upload_headers:type_name -> helios.speech.GetUploadUrlResponse.UploadHeadersEntry
0, // 1: helios.speech.SpeechService.GetUploadUrl:input_type -> helios.speech.GetUploadUrlRequest
2, // 2: helios.speech.SpeechService.Transcribe:input_type -> helios.speech.TranscribeRequest
1, // 3: helios.speech.SpeechService.GetUploadUrl:output_type -> helios.speech.GetUploadUrlResponse
3, // 4: helios.speech.SpeechService.Transcribe:output_type -> helios.speech.TranscribeResponse
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_helios_speech_speech_proto_init() }
func file_helios_speech_speech_proto_init() {
if File_helios_speech_speech_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_helios_speech_speech_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_helios_speech_speech_proto_goTypes,
DependencyIndexes: file_helios_speech_speech_proto_depIdxs,
MessageInfos: file_helios_speech_speech_proto_msgTypes,
}.Build()
File_helios_speech_speech_proto = out.File
file_helios_speech_speech_proto_rawDesc = nil
file_helios_speech_speech_proto_goTypes = nil
file_helios_speech_speech_proto_depIdxs = nil
}
@@ -0,0 +1,163 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.28.3
// source: helios/speech/speech.proto
package pbspeech
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
SpeechService_GetUploadUrl_FullMethodName = "/helios.speech.SpeechService/GetUploadUrl"
SpeechService_Transcribe_FullMethodName = "/helios.speech.SpeechService/Transcribe"
)
// SpeechServiceClient is the client API for SpeechService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SpeechServiceClient interface {
GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error)
// Transcribes the given media & cleans up the resources.
// NOTE: must have uploaded to referenced object.
Transcribe(ctx context.Context, in *TranscribeRequest, opts ...grpc.CallOption) (*TranscribeResponse, error)
}
type speechServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSpeechServiceClient(cc grpc.ClientConnInterface) SpeechServiceClient {
return &speechServiceClient{cc}
}
func (c *speechServiceClient) GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUploadUrlResponse)
err := c.cc.Invoke(ctx, SpeechService_GetUploadUrl_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speechServiceClient) Transcribe(ctx context.Context, in *TranscribeRequest, opts ...grpc.CallOption) (*TranscribeResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TranscribeResponse)
err := c.cc.Invoke(ctx, SpeechService_Transcribe_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SpeechServiceServer is the server API for SpeechService service.
// All implementations must embed UnimplementedSpeechServiceServer
// for forward compatibility.
type SpeechServiceServer interface {
GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error)
// Transcribes the given media & cleans up the resources.
// NOTE: must have uploaded to referenced object.
Transcribe(context.Context, *TranscribeRequest) (*TranscribeResponse, error)
mustEmbedUnimplementedSpeechServiceServer()
}
// UnimplementedSpeechServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSpeechServiceServer struct{}
func (UnimplementedSpeechServiceServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUploadUrl not implemented")
}
func (UnimplementedSpeechServiceServer) Transcribe(context.Context, *TranscribeRequest) (*TranscribeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Transcribe not implemented")
}
func (UnimplementedSpeechServiceServer) mustEmbedUnimplementedSpeechServiceServer() {}
func (UnimplementedSpeechServiceServer) testEmbeddedByValue() {}
// UnsafeSpeechServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SpeechServiceServer will
// result in compilation errors.
type UnsafeSpeechServiceServer interface {
mustEmbedUnimplementedSpeechServiceServer()
}
func RegisterSpeechServiceServer(s grpc.ServiceRegistrar, srv SpeechServiceServer) {
// If the following call pancis, it indicates UnimplementedSpeechServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&SpeechService_ServiceDesc, srv)
}
func _SpeechService_GetUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUploadUrlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServiceServer).GetUploadUrl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SpeechService_GetUploadUrl_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServiceServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SpeechService_Transcribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TranscribeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServiceServer).Transcribe(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SpeechService_Transcribe_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServiceServer).Transcribe(ctx, req.(*TranscribeRequest))
}
return interceptor(ctx, in, info, handler)
}
// SpeechService_ServiceDesc is the grpc.ServiceDesc for SpeechService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SpeechService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "helios.speech.SpeechService",
HandlerType: (*SpeechServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUploadUrl",
Handler: _SpeechService_GetUploadUrl_Handler,
},
{
MethodName: "Transcribe",
Handler: _SpeechService_Transcribe_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "helios/speech/speech.proto",
}