@@ -69,6 +69,75 @@ extension Speechly_Analytics_V1_Aggregation: CaseIterable {
6969
7070#endif // swift(>=4.2)
7171
72+ /// The various types of processing that can be applied to the audio.
73+ public enum Speechly_Analytics_V1_ProcessingType : SwiftProtobuf . Enum {
74+ public typealias RawValue = Int
75+ case invalid // = 0
76+ case transcription // = 1
77+ case nlu // = 2
78+ case languageDetection // = 3
79+ case vad // = 4
80+ case translation // = 5
81+ case audioEventDetection // = 6
82+ case toneOfVoiceLabelling // = 7
83+ case shallowFusion // = 8
84+ case UNRECOGNIZED( Int )
85+
86+ public init ( ) {
87+ self = . invalid
88+ }
89+
90+ public init ? ( rawValue: Int ) {
91+ switch rawValue {
92+ case 0 : self = . invalid
93+ case 1 : self = . transcription
94+ case 2 : self = . nlu
95+ case 3 : self = . languageDetection
96+ case 4 : self = . vad
97+ case 5 : self = . translation
98+ case 6 : self = . audioEventDetection
99+ case 7 : self = . toneOfVoiceLabelling
100+ case 8 : self = . shallowFusion
101+ default : self = . UNRECOGNIZED( rawValue)
102+ }
103+ }
104+
105+ public var rawValue : Int {
106+ switch self {
107+ case . invalid: return 0
108+ case . transcription: return 1
109+ case . nlu: return 2
110+ case . languageDetection: return 3
111+ case . vad: return 4
112+ case . translation: return 5
113+ case . audioEventDetection: return 6
114+ case . toneOfVoiceLabelling: return 7
115+ case . shallowFusion: return 8
116+ case . UNRECOGNIZED( let i) : return i
117+ }
118+ }
119+
120+ }
121+
122+ #if swift(>=4.2)
123+
124+ extension Speechly_Analytics_V1_ProcessingType : CaseIterable {
125+ // The compiler won't synthesize support with the UNRECOGNIZED case.
126+ public static var allCases : [ Speechly_Analytics_V1_ProcessingType ] = [
127+ . invalid,
128+ . transcription,
129+ . nlu,
130+ . languageDetection,
131+ . vad,
132+ . translation,
133+ . audioEventDetection,
134+ . toneOfVoiceLabelling,
135+ . shallowFusion,
136+ ]
137+ }
138+
139+ #endif // swift(>=4.2)
140+
72141/// Single row of statistics response.
73142public struct Speechly_Analytics_V1_UtteranceStatisticsPeriod {
74143 // SwiftProtobuf.Message conformance is added in an extension below. See the
@@ -90,7 +159,7 @@ public struct Speechly_Analytics_V1_UtteranceStatisticsPeriod {
90159 /// Total duration of annotated utterances in the current period.
91160 public var annotatedSeconds : Int32 = 0
92161
93- /// project_id or empty, if specifiying a project.
162+ /// project_id or empty, if specifying a project.
94163 public var projectID : String = String ( )
95164
96165 public var unknownFields = SwiftProtobuf . UnknownStorage ( )
@@ -138,11 +207,30 @@ public struct Speechly_Analytics_V1_DecoderInfo {
138207 public init ( ) { }
139208}
140209
210+ /// Specifies what processing has been applied to an utterance.
211+ public struct Speechly_Analytics_V1_ProcessingInfo {
212+ // SwiftProtobuf.Message conformance is added in an extension below. See the
213+ // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
214+ // methods supported on all messages.
215+
216+ /// The processing types that were applied
217+ public var processingTypes : [ Speechly_Analytics_V1_ProcessingType ] = [ ]
218+
219+ /// id of the model that was used for processing
220+ public var modelID : String = String ( )
221+
222+ public var unknownFields = SwiftProtobuf . UnknownStorage ( )
223+
224+ public init ( ) { }
225+ }
226+
141227#if swift(>=5.5) && canImport(_Concurrency)
142228extension Speechly_Analytics_V1_Aggregation : @unchecked Sendable { }
229+ extension Speechly_Analytics_V1_ProcessingType : @unchecked Sendable { }
143230extension Speechly_Analytics_V1_UtteranceStatisticsPeriod : @unchecked Sendable { }
144231extension Speechly_Analytics_V1_Utterance : @unchecked Sendable { }
145232extension Speechly_Analytics_V1_DecoderInfo : @unchecked Sendable { }
233+ extension Speechly_Analytics_V1_ProcessingInfo : @unchecked Sendable { }
146234#endif // swift(>=5.5) && canImport(_Concurrency)
147235
148236// MARK: - Code below here is support for the SwiftProtobuf runtime.
@@ -158,6 +246,20 @@ extension Speechly_Analytics_V1_Aggregation: SwiftProtobuf._ProtoNameProviding {
158246 ]
159247}
160248
249+ extension Speechly_Analytics_V1_ProcessingType : SwiftProtobuf . _ProtoNameProviding {
250+ public static let _protobuf_nameMap : SwiftProtobuf . _NameMap = [
251+ 0 : . same( proto: " PROCESSING_TYPE_INVALID " ) ,
252+ 1 : . same( proto: " PROCESSING_TYPE_TRANSCRIPTION " ) ,
253+ 2 : . same( proto: " PROCESSING_TYPE_NLU " ) ,
254+ 3 : . same( proto: " PROCESSING_TYPE_LANGUAGE_DETECTION " ) ,
255+ 4 : . same( proto: " PROCESSING_TYPE_VAD " ) ,
256+ 5 : . same( proto: " PROCESSING_TYPE_TRANSLATION " ) ,
257+ 6 : . same( proto: " PROCESSING_TYPE_AUDIO_EVENT_DETECTION " ) ,
258+ 7 : . same( proto: " PROCESSING_TYPE_TONE_OF_VOICE_LABELLING " ) ,
259+ 8 : . same( proto: " PROCESSING_TYPE_SHALLOW_FUSION " ) ,
260+ ]
261+ }
262+
161263extension Speechly_Analytics_V1_UtteranceStatisticsPeriod : SwiftProtobuf . Message , SwiftProtobuf . _MessageImplementationBase , SwiftProtobuf . _ProtoNameProviding {
162264 public static let protoMessageName : String = _protobuf_package + " .UtteranceStatisticsPeriod "
163265 public static let _protobuf_nameMap : SwiftProtobuf . _NameMap = [
@@ -307,3 +409,41 @@ extension Speechly_Analytics_V1_DecoderInfo: SwiftProtobuf.Message, SwiftProtobu
307409 return true
308410 }
309411}
412+
413+ extension Speechly_Analytics_V1_ProcessingInfo : SwiftProtobuf . Message , SwiftProtobuf . _MessageImplementationBase , SwiftProtobuf . _ProtoNameProviding {
414+ public static let protoMessageName : String = _protobuf_package + " .ProcessingInfo "
415+ public static let _protobuf_nameMap : SwiftProtobuf . _NameMap = [
416+ 1 : . standard( proto: " processing_types " ) ,
417+ 2 : . standard( proto: " model_id " ) ,
418+ ]
419+
420+ public mutating func decodeMessage< D: SwiftProtobuf . Decoder > ( decoder: inout D ) throws {
421+ while let fieldNumber = try decoder. nextFieldNumber ( ) {
422+ // The use of inline closures is to circumvent an issue where the compiler
423+ // allocates stack space for every case branch when no optimizations are
424+ // enabled. https://github.com/apple/swift-protobuf/issues/1034
425+ switch fieldNumber {
426+ case 1 : try { try decoder. decodeRepeatedEnumField ( value: & self . processingTypes) } ( )
427+ case 2 : try { try decoder. decodeSingularStringField ( value: & self . modelID) } ( )
428+ default : break
429+ }
430+ }
431+ }
432+
433+ public func traverse< V: SwiftProtobuf . Visitor > ( visitor: inout V ) throws {
434+ if !self . processingTypes. isEmpty {
435+ try visitor. visitPackedEnumField ( value: self . processingTypes, fieldNumber: 1 )
436+ }
437+ if !self . modelID. isEmpty {
438+ try visitor. visitSingularStringField ( value: self . modelID, fieldNumber: 2 )
439+ }
440+ try unknownFields. traverse ( visitor: & visitor)
441+ }
442+
443+ public static func == ( lhs: Speechly_Analytics_V1_ProcessingInfo , rhs: Speechly_Analytics_V1_ProcessingInfo ) -> Bool {
444+ if lhs. processingTypes != rhs. processingTypes { return false }
445+ if lhs. modelID != rhs. modelID { return false }
446+ if lhs. unknownFields != rhs. unknownFields { return false }
447+ return true
448+ }
449+ }
0 commit comments