assemblyai 1.0.0.pre.beta.7 → 1.0.0.pre.beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assemblyai/files/client.rb +4 -2
  3. data/lib/assemblyai/files/types/uploaded_file.rb +20 -11
  4. data/lib/assemblyai/lemur/client.rb +256 -150
  5. data/lib/assemblyai/lemur/types/lemur_action_items_response.rb +28 -14
  6. data/lib/assemblyai/lemur/types/lemur_base_params.rb +83 -54
  7. data/lib/assemblyai/lemur/types/lemur_base_params_context.rb +11 -5
  8. data/lib/assemblyai/lemur/types/lemur_base_response.rb +20 -11
  9. data/lib/assemblyai/lemur/types/lemur_question.rb +57 -31
  10. data/lib/assemblyai/lemur/types/lemur_question_answer.rb +28 -14
  11. data/lib/assemblyai/lemur/types/lemur_question_answer_response.rb +29 -14
  12. data/lib/assemblyai/lemur/types/lemur_question_context.rb +13 -6
  13. data/lib/assemblyai/lemur/types/lemur_summary_response.rb +28 -14
  14. data/lib/assemblyai/lemur/types/lemur_task_response.rb +28 -14
  15. data/lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb +32 -17
  16. data/lib/assemblyai/realtime/client.rb +30 -14
  17. data/lib/assemblyai/realtime/types/configure_end_utterance_silence_threshold.rb +24 -13
  18. data/lib/assemblyai/realtime/types/final_transcript.rb +72 -41
  19. data/lib/assemblyai/realtime/types/force_end_utterance.rb +20 -11
  20. data/lib/assemblyai/realtime/types/message_type.rb +1 -0
  21. data/lib/assemblyai/realtime/types/partial_transcript.rb +62 -34
  22. data/lib/assemblyai/realtime/types/realtime_base_message.rb +22 -13
  23. data/lib/assemblyai/realtime/types/realtime_base_transcript.rb +57 -31
  24. data/lib/assemblyai/realtime/types/realtime_error.rb +20 -11
  25. data/lib/assemblyai/realtime/types/realtime_message.rb +44 -18
  26. data/lib/assemblyai/realtime/types/realtime_temporary_token_response.rb +20 -11
  27. data/lib/assemblyai/realtime/types/realtime_transcript.rb +15 -9
  28. data/lib/assemblyai/realtime/types/session_begins.rb +31 -14
  29. data/lib/assemblyai/realtime/types/session_information.rb +69 -0
  30. data/lib/assemblyai/realtime/types/session_terminated.rb +20 -11
  31. data/lib/assemblyai/realtime/types/terminate_session.rb +20 -11
  32. data/lib/assemblyai/realtime/types/word.rb +36 -18
  33. data/lib/assemblyai/streaming/types/receive_message.rb +113 -0
  34. data/lib/assemblyai/{realtime → streaming}/types/send_message.rb +26 -14
  35. data/lib/assemblyai/streaming/types/streaming.rb +11 -0
  36. data/lib/assemblyai/transcripts/client.rb +50 -18
  37. data/lib/assemblyai/transcripts/list_by_url_client.rb +6 -4
  38. data/lib/assemblyai/transcripts/polling_client.rb +12 -2
  39. data/lib/assemblyai/transcripts/types/auto_highlight_result.rb +40 -19
  40. data/lib/assemblyai/transcripts/types/auto_highlights_result.rb +38 -14
  41. data/lib/assemblyai/transcripts/types/chapter.rb +40 -20
  42. data/lib/assemblyai/transcripts/types/content_safety_label.rb +32 -16
  43. data/lib/assemblyai/transcripts/types/content_safety_label_result.rb +51 -29
  44. data/lib/assemblyai/transcripts/types/content_safety_labels_result.rb +51 -29
  45. data/lib/assemblyai/transcripts/types/entity.rb +41 -21
  46. data/lib/assemblyai/transcripts/types/page_details.rb +59 -33
  47. data/lib/assemblyai/transcripts/types/paragraphs_response.rb +37 -19
  48. data/lib/assemblyai/transcripts/types/redact_pii_audio_quality.rb +4 -1
  49. data/lib/assemblyai/transcripts/types/redacted_audio_response.rb +29 -15
  50. data/lib/assemblyai/transcripts/types/sentences_response.rb +37 -19
  51. data/lib/assemblyai/transcripts/types/sentiment_analysis_result.rb +62 -35
  52. data/lib/assemblyai/transcripts/types/severity_score_summary.rb +32 -16
  53. data/lib/assemblyai/transcripts/types/speech_model.rb +1 -0
  54. data/lib/assemblyai/transcripts/types/substitution_policy.rb +3 -1
  55. data/lib/assemblyai/transcripts/types/timestamp.rb +28 -14
  56. data/lib/assemblyai/transcripts/types/topic_detection_model_result.rb +39 -19
  57. data/lib/assemblyai/transcripts/types/topic_detection_result.rb +40 -21
  58. data/lib/assemblyai/transcripts/types/topic_detection_result_labels_item.rb +31 -15
  59. data/lib/assemblyai/transcripts/types/transcript.rb +512 -293
  60. data/lib/assemblyai/transcripts/types/transcript_custom_spelling.rb +30 -15
  61. data/lib/assemblyai/transcripts/types/transcript_language_code.rb +3 -2
  62. data/lib/assemblyai/transcripts/types/transcript_list.rb +33 -17
  63. data/lib/assemblyai/transcripts/types/transcript_list_item.rb +60 -34
  64. data/lib/assemblyai/transcripts/types/transcript_optional_params.rb +334 -191
  65. data/lib/assemblyai/transcripts/types/transcript_paragraph.rb +61 -33
  66. data/lib/assemblyai/transcripts/types/transcript_ready_notification.rb +30 -16
  67. data/lib/assemblyai/transcripts/types/transcript_sentence.rb +61 -33
  68. data/lib/assemblyai/transcripts/types/transcript_status.rb +2 -1
  69. data/lib/assemblyai/transcripts/types/transcript_utterance.rb +55 -31
  70. data/lib/assemblyai/transcripts/types/transcript_word.rb +55 -24
  71. data/lib/assemblyai/transcripts/types/word_search_match.rb +40 -20
  72. data/lib/assemblyai/transcripts/types/word_search_response.rb +36 -17
  73. data/lib/assemblyai/types/error.rb +32 -16
  74. data/lib/requests.rb +80 -34
  75. data/lib/types_export.rb +4 -3
  76. metadata +6 -5
  77. data/lib/assemblyai/realtime/types/audio_data.rb +0 -7
  78. data/lib/assemblyai/realtime/types/receive_message.rb +0 -87
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "speech_model"
4
3
  require_relative "transcript_language_code"
4
+ require_relative "speech_model"
5
5
  require_relative "transcript_boost_param"
6
6
  require_relative "redact_pii_audio_quality"
7
7
  require_relative "pii_policy"
@@ -9,237 +9,380 @@ require_relative "substitution_policy"
9
9
  require_relative "transcript_custom_spelling"
10
10
  require_relative "summary_model"
11
11
  require_relative "summary_type"
12
+ require "ostruct"
12
13
  require "json"
13
14
 
14
15
  module AssemblyAI
15
16
  class Transcripts
16
17
  # The parameters for creating a transcript
17
18
  class TranscriptOptionalParams
18
- attr_reader :speech_model, :language_code, :punctuate, :format_text, :dual_channel, :webhook_url,
19
- :webhook_auth_header_name, :webhook_auth_header_value, :auto_highlights, :audio_start_from, :audio_end_at, :word_boost, :boost_param, :filter_profanity, :redact_pii, :redact_pii_audio, :redact_pii_audio_quality, :redact_pii_policies, :redact_pii_sub, :speaker_labels, :speakers_expected, :content_safety, :content_safety_confidence, :iab_categories, :language_detection, :custom_spelling, :disfluencies, :sentiment_analysis, :auto_chapters, :entity_detection, :speech_threshold, :summarization, :summary_model, :summary_type, :custom_topics, :topics, :additional_properties
19
+ # @return [AssemblyAI::Transcripts::TranscriptLanguageCode]
20
+ attr_reader :language_code
21
+ # @return [Boolean] Enable Automatic Punctuation, can be true or false
22
+ attr_reader :punctuate
23
+ # @return [Boolean] Enable Text Formatting, can be true or false
24
+ attr_reader :format_text
25
+ # @return [Boolean] Enable [Dual
26
+ # ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
27
+ # transcription, can be true or false.
28
+ attr_reader :dual_channel
29
+ # @return [AssemblyAI::Transcripts::SpeechModel]
30
+ attr_reader :speech_model
31
+ # @return [String] The URL to which AssemblyAI send webhooks upon trancription completion
32
+ attr_reader :webhook_url
33
+ # @return [String] The header name which should be sent back with webhook calls
34
+ attr_reader :webhook_auth_header_name
35
+ # @return [String] Specify a header name and value to send back with a webhook call for added
36
+ # security
37
+ attr_reader :webhook_auth_header_value
38
+ # @return [Boolean] Whether Key Phrases is enabled, either true or false
39
+ attr_reader :auto_highlights
40
+ # @return [Integer] The point in time, in milliseconds, to begin transcribing in your media file
41
+ attr_reader :audio_start_from
42
+ # @return [Integer] The point in time, in milliseconds, to stop transcribing in your media file
43
+ attr_reader :audio_end_at
44
+ # @return [Array<String>] The list of custom vocabulary to boost transcription probability for
45
+ attr_reader :word_boost
46
+ # @return [AssemblyAI::Transcripts::TranscriptBoostParam] The word boost parameter value
47
+ attr_reader :boost_param
48
+ # @return [Boolean] Filter profanity from the transcribed text, can be true or false
49
+ attr_reader :filter_profanity
50
+ # @return [Boolean] Redact PII from the transcribed text using the Redact PII model, can be true or
51
+ # false
52
+ attr_reader :redact_pii
53
+ # @return [Boolean] Generate a copy of the original media file with spoken PII "beeped" out, can be
54
+ # true or false. See [PII
55
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
56
+ # details.
57
+ attr_reader :redact_pii_audio
58
+ # @return [AssemblyAI::Transcripts::RedactPiiAudioQuality] Controls the filetype of the audio created by redact_pii_audio. Currently
59
+ # supports mp3 (default) and wav. See [PII
60
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
61
+ # details.
62
+ attr_reader :redact_pii_audio_quality
63
+ # @return [Array<AssemblyAI::Transcripts::PiiPolicy>] The list of PII Redaction policies to enable. See [PII
64
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
65
+ # details.
66
+ attr_reader :redact_pii_policies
67
+ # @return [AssemblyAI::Transcripts::SubstitutionPolicy]
68
+ attr_reader :redact_pii_sub
69
+ # @return [Boolean] Enable [Speaker
70
+ # diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be
71
+ # true or false
72
+ attr_reader :speaker_labels
73
+ # @return [Integer] Tells the speaker label model how many speakers it should attempt to identify,
74
+ # up to 10. See [Speaker
75
+ # diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for
76
+ # more details.
77
+ attr_reader :speakers_expected
78
+ # @return [Boolean] Enable [Content
79
+ # Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be
80
+ # true or false
81
+ attr_reader :content_safety
82
+ # @return [Integer] The confidence threshold for content moderation. Values must be between 25 and
83
+ # 100.
84
+ attr_reader :content_safety_confidence
85
+ # @return [Boolean] Enable [Topic
86
+ # Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true
87
+ # or false
88
+ attr_reader :iab_categories
89
+ # @return [Boolean] Whether [Automatic language
90
+ # /www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection)
91
+ # was enabled in the transcription request, either true or false.
92
+ attr_reader :language_detection
93
+ # @return [Array<AssemblyAI::Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
94
+ attr_reader :custom_spelling
95
+ # @return [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
96
+ attr_reader :disfluencies
97
+ # @return [Boolean] Enable [Sentiment
98
+ # Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be
99
+ # true or false
100
+ attr_reader :sentiment_analysis
101
+ # @return [Boolean] Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters),
102
+ # can be true or false
103
+ attr_reader :auto_chapters
104
+ # @return [Boolean] Enable [Entity
105
+ # Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true
106
+ # or false
107
+ attr_reader :entity_detection
108
+ # @return [Float] Reject audio files that contain less than this fraction of speech.
109
+ # Valid values are in the range [0, 1] inclusive.
110
+ attr_reader :speech_threshold
111
+ # @return [Boolean] Enable [Summarization](https://www.assemblyai.com/docs/models/summarization),
112
+ # can be true or false
113
+ attr_reader :summarization
114
+ # @return [AssemblyAI::Transcripts::SummaryModel] The model to summarize the transcript
115
+ attr_reader :summary_model
116
+ # @return [AssemblyAI::Transcripts::SummaryType] The type of summary
117
+ attr_reader :summary_type
118
+ # @return [Boolean] Whether custom topics is enabled, either true or false
119
+ attr_reader :custom_topics
120
+ # @return [Array<String>] The list of custom topics provided, if custom topics is enabled
121
+ attr_reader :topics
122
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
123
+ attr_reader :additional_properties
124
+ # @return [Object]
125
+ attr_reader :_field_set
126
+ protected :_field_set
20
127
 
21
- # @param speech_model [Transcripts::SpeechModel]
22
- # @param language_code [Transcripts::TranscriptLanguageCode]
128
+ OMIT = Object.new
129
+
130
+ # @param language_code [AssemblyAI::Transcripts::TranscriptLanguageCode]
23
131
  # @param punctuate [Boolean] Enable Automatic Punctuation, can be true or false
24
132
  # @param format_text [Boolean] Enable Text Formatting, can be true or false
25
- # @param dual_channel [Boolean] Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
133
+ # @param dual_channel [Boolean] Enable [Dual
134
+ # ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
135
+ # transcription, can be true or false.
136
+ # @param speech_model [AssemblyAI::Transcripts::SpeechModel]
26
137
  # @param webhook_url [String] The URL to which AssemblyAI send webhooks upon trancription completion
27
138
  # @param webhook_auth_header_name [String] The header name which should be sent back with webhook calls
28
- # @param webhook_auth_header_value [String] Specify a header name and value to send back with a webhook call for added security
139
+ # @param webhook_auth_header_value [String] Specify a header name and value to send back with a webhook call for added
140
+ # security
29
141
  # @param auto_highlights [Boolean] Whether Key Phrases is enabled, either true or false
30
142
  # @param audio_start_from [Integer] The point in time, in milliseconds, to begin transcribing in your media file
31
143
  # @param audio_end_at [Integer] The point in time, in milliseconds, to stop transcribing in your media file
32
144
  # @param word_boost [Array<String>] The list of custom vocabulary to boost transcription probability for
33
- # @param boost_param [Transcripts::TranscriptBoostParam] The word boost parameter value
145
+ # @param boost_param [AssemblyAI::Transcripts::TranscriptBoostParam] The word boost parameter value
34
146
  # @param filter_profanity [Boolean] Filter profanity from the transcribed text, can be true or false
35
- # @param redact_pii [Boolean] Redact PII from the transcribed text using the Redact PII model, can be true or false
36
- # @param redact_pii_audio [Boolean] Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
37
- # @param redact_pii_audio_quality [Transcripts::RedactPiiAudioQuality] Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
38
- # @param redact_pii_policies [Array<Transcripts::PiiPolicy>] The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
39
- # @param redact_pii_sub [Transcripts::SubstitutionPolicy]
40
- # @param speaker_labels [Boolean] Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
41
- # @param speakers_expected [Integer] Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
42
- # @param content_safety [Boolean] Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
43
- # @param content_safety_confidence [Integer] The confidence threshold for content moderation. Values must be between 25 and 100.
44
- # @param iab_categories [Boolean] Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
45
- # @param language_detection [Boolean] Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) was enabled in the transcription request, either true or false.
46
- # @param custom_spelling [Array<Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
147
+ # @param redact_pii [Boolean] Redact PII from the transcribed text using the Redact PII model, can be true or
148
+ # false
149
+ # @param redact_pii_audio [Boolean] Generate a copy of the original media file with spoken PII "beeped" out, can be
150
+ # true or false. See [PII
151
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
152
+ # details.
153
+ # @param redact_pii_audio_quality [AssemblyAI::Transcripts::RedactPiiAudioQuality] Controls the filetype of the audio created by redact_pii_audio. Currently
154
+ # supports mp3 (default) and wav. See [PII
155
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
156
+ # details.
157
+ # @param redact_pii_policies [Array<AssemblyAI::Transcripts::PiiPolicy>] The list of PII Redaction policies to enable. See [PII
158
+ # redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more
159
+ # details.
160
+ # @param redact_pii_sub [AssemblyAI::Transcripts::SubstitutionPolicy]
161
+ # @param speaker_labels [Boolean] Enable [Speaker
162
+ # diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be
163
+ # true or false
164
+ # @param speakers_expected [Integer] Tells the speaker label model how many speakers it should attempt to identify,
165
+ # up to 10. See [Speaker
166
+ # diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for
167
+ # more details.
168
+ # @param content_safety [Boolean] Enable [Content
169
+ # Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be
170
+ # true or false
171
+ # @param content_safety_confidence [Integer] The confidence threshold for content moderation. Values must be between 25 and
172
+ # 100.
173
+ # @param iab_categories [Boolean] Enable [Topic
174
+ # Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true
175
+ # or false
176
+ # @param language_detection [Boolean] Whether [Automatic language
177
+ # /www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection)
178
+ # was enabled in the transcription request, either true or false.
179
+ # @param custom_spelling [Array<AssemblyAI::Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
47
180
  # @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
48
- # @param sentiment_analysis [Boolean] Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
49
- # @param auto_chapters [Boolean] Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
50
- # @param entity_detection [Boolean] Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
181
+ # @param sentiment_analysis [Boolean] Enable [Sentiment
182
+ # Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be
183
+ # true or false
184
+ # @param auto_chapters [Boolean] Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters),
185
+ # can be true or false
186
+ # @param entity_detection [Boolean] Enable [Entity
187
+ # Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true
188
+ # or false
51
189
  # @param speech_threshold [Float] Reject audio files that contain less than this fraction of speech.
52
- # Valid values are in the range [0, 1] inclusive.
53
- # @param summarization [Boolean] Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
54
- # @param summary_model [Transcripts::SummaryModel] The model to summarize the transcript
55
- # @param summary_type [Transcripts::SummaryType] The type of summary
190
+ # Valid values are in the range [0, 1] inclusive.
191
+ # @param summarization [Boolean] Enable [Summarization](https://www.assemblyai.com/docs/models/summarization),
192
+ # can be true or false
193
+ # @param summary_model [AssemblyAI::Transcripts::SummaryModel] The model to summarize the transcript
194
+ # @param summary_type [AssemblyAI::Transcripts::SummaryType] The type of summary
56
195
  # @param custom_topics [Boolean] Whether custom topics is enabled, either true or false
57
196
  # @param topics [Array<String>] The list of custom topics provided, if custom topics is enabled
58
197
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
59
- # @return [Transcripts::TranscriptOptionalParams]
60
- def initialize(speech_model: nil, language_code: nil, punctuate: nil, format_text: nil, dual_channel: nil,
61
- webhook_url: nil, webhook_auth_header_name: nil, webhook_auth_header_value: nil, auto_highlights: nil, audio_start_from: nil, audio_end_at: nil, word_boost: nil, boost_param: nil, filter_profanity: nil, redact_pii: nil, redact_pii_audio: nil, redact_pii_audio_quality: nil, redact_pii_policies: nil, redact_pii_sub: nil, speaker_labels: nil, speakers_expected: nil, content_safety: nil, content_safety_confidence: nil, iab_categories: nil, language_detection: nil, custom_spelling: nil, disfluencies: nil, sentiment_analysis: nil, auto_chapters: nil, entity_detection: nil, speech_threshold: nil, summarization: nil, summary_model: nil, summary_type: nil, custom_topics: nil, topics: nil, additional_properties: nil)
62
- # @type [Transcripts::SpeechModel]
63
- @speech_model = speech_model
64
- # @type [Transcripts::TranscriptLanguageCode]
65
- @language_code = language_code
66
- # @type [Boolean] Enable Automatic Punctuation, can be true or false
67
- @punctuate = punctuate
68
- # @type [Boolean] Enable Text Formatting, can be true or false
69
- @format_text = format_text
70
- # @type [Boolean] Enable [Dual Channel](https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription) transcription, can be true or false.
71
- @dual_channel = dual_channel
72
- # @type [String] The URL to which AssemblyAI send webhooks upon trancription completion
73
- @webhook_url = webhook_url
74
- # @type [String] The header name which should be sent back with webhook calls
75
- @webhook_auth_header_name = webhook_auth_header_name
76
- # @type [String] Specify a header name and value to send back with a webhook call for added security
77
- @webhook_auth_header_value = webhook_auth_header_value
78
- # @type [Boolean] Whether Key Phrases is enabled, either true or false
79
- @auto_highlights = auto_highlights
80
- # @type [Integer] The point in time, in milliseconds, to begin transcribing in your media file
81
- @audio_start_from = audio_start_from
82
- # @type [Integer] The point in time, in milliseconds, to stop transcribing in your media file
83
- @audio_end_at = audio_end_at
84
- # @type [Array<String>] The list of custom vocabulary to boost transcription probability for
85
- @word_boost = word_boost
86
- # @type [Transcripts::TranscriptBoostParam] The word boost parameter value
87
- @boost_param = boost_param
88
- # @type [Boolean] Filter profanity from the transcribed text, can be true or false
89
- @filter_profanity = filter_profanity
90
- # @type [Boolean] Redact PII from the transcribed text using the Redact PII model, can be true or false
91
- @redact_pii = redact_pii
92
- # @type [Boolean] Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
93
- @redact_pii_audio = redact_pii_audio
94
- # @type [Transcripts::RedactPiiAudioQuality] Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
95
- @redact_pii_audio_quality = redact_pii_audio_quality
96
- # @type [Array<Transcripts::PiiPolicy>] The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
97
- @redact_pii_policies = redact_pii_policies
98
- # @type [Transcripts::SubstitutionPolicy]
99
- @redact_pii_sub = redact_pii_sub
100
- # @type [Boolean] Enable [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization), can be true or false
101
- @speaker_labels = speaker_labels
102
- # @type [Integer] Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
103
- @speakers_expected = speakers_expected
104
- # @type [Boolean] Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
105
- @content_safety = content_safety
106
- # @type [Integer] The confidence threshold for content moderation. Values must be between 25 and 100.
107
- @content_safety_confidence = content_safety_confidence
108
- # @type [Boolean] Enable [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true or false
109
- @iab_categories = iab_categories
110
- # @type [Boolean] Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) was enabled in the transcription request, either true or false.
111
- @language_detection = language_detection
112
- # @type [Array<Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
113
- @custom_spelling = custom_spelling
114
- # @type [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
115
- @disfluencies = disfluencies
116
- # @type [Boolean] Enable [Sentiment Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis), can be true or false
117
- @sentiment_analysis = sentiment_analysis
118
- # @type [Boolean] Enable [Auto Chapters](https://www.assemblyai.com/docs/models/auto-chapters), can be true or false
119
- @auto_chapters = auto_chapters
120
- # @type [Boolean] Enable [Entity Detection](https://www.assemblyai.com/docs/models/entity-detection), can be true or false
121
- @entity_detection = entity_detection
122
- # @type [Float] Reject audio files that contain less than this fraction of speech.
123
- # Valid values are in the range [0, 1] inclusive.
124
- @speech_threshold = speech_threshold
125
- # @type [Boolean] Enable [Summarization](https://www.assemblyai.com/docs/models/summarization), can be true or false
126
- @summarization = summarization
127
- # @type [Transcripts::SummaryModel] The model to summarize the transcript
128
- @summary_model = summary_model
129
- # @type [Transcripts::SummaryType] The type of summary
130
- @summary_type = summary_type
131
- # @type [Boolean] Whether custom topics is enabled, either true or false
132
- @custom_topics = custom_topics
133
- # @type [Array<String>] The list of custom topics provided, if custom topics is enabled
134
- @topics = topics
135
- # @type [OpenStruct] Additional properties unmapped to the current class definition
198
+ # @return [AssemblyAI::Transcripts::TranscriptOptionalParams]
199
+ def initialize(language_code: OMIT, punctuate: OMIT, format_text: OMIT, dual_channel: OMIT, speech_model: OMIT,
200
+ webhook_url: OMIT, webhook_auth_header_name: OMIT, webhook_auth_header_value: OMIT, auto_highlights: OMIT, audio_start_from: OMIT, audio_end_at: OMIT, word_boost: OMIT, boost_param: OMIT, filter_profanity: OMIT, redact_pii: OMIT, redact_pii_audio: OMIT, redact_pii_audio_quality: OMIT, redact_pii_policies: OMIT, redact_pii_sub: OMIT, speaker_labels: OMIT, speakers_expected: OMIT, content_safety: OMIT, content_safety_confidence: OMIT, iab_categories: OMIT, language_detection: OMIT, custom_spelling: OMIT, disfluencies: OMIT, sentiment_analysis: OMIT, auto_chapters: OMIT, entity_detection: OMIT, speech_threshold: OMIT, summarization: OMIT, summary_model: OMIT, summary_type: OMIT, custom_topics: OMIT, topics: OMIT, additional_properties: nil)
201
+ @language_code = language_code if language_code != OMIT
202
+ @punctuate = punctuate if punctuate != OMIT
203
+ @format_text = format_text if format_text != OMIT
204
+ @dual_channel = dual_channel if dual_channel != OMIT
205
+ @speech_model = speech_model if speech_model != OMIT
206
+ @webhook_url = webhook_url if webhook_url != OMIT
207
+ @webhook_auth_header_name = webhook_auth_header_name if webhook_auth_header_name != OMIT
208
+ @webhook_auth_header_value = webhook_auth_header_value if webhook_auth_header_value != OMIT
209
+ @auto_highlights = auto_highlights if auto_highlights != OMIT
210
+ @audio_start_from = audio_start_from if audio_start_from != OMIT
211
+ @audio_end_at = audio_end_at if audio_end_at != OMIT
212
+ @word_boost = word_boost if word_boost != OMIT
213
+ @boost_param = boost_param if boost_param != OMIT
214
+ @filter_profanity = filter_profanity if filter_profanity != OMIT
215
+ @redact_pii = redact_pii if redact_pii != OMIT
216
+ @redact_pii_audio = redact_pii_audio if redact_pii_audio != OMIT
217
+ @redact_pii_audio_quality = redact_pii_audio_quality if redact_pii_audio_quality != OMIT
218
+ @redact_pii_policies = redact_pii_policies if redact_pii_policies != OMIT
219
+ @redact_pii_sub = redact_pii_sub if redact_pii_sub != OMIT
220
+ @speaker_labels = speaker_labels if speaker_labels != OMIT
221
+ @speakers_expected = speakers_expected if speakers_expected != OMIT
222
+ @content_safety = content_safety if content_safety != OMIT
223
+ @content_safety_confidence = content_safety_confidence if content_safety_confidence != OMIT
224
+ @iab_categories = iab_categories if iab_categories != OMIT
225
+ @language_detection = language_detection if language_detection != OMIT
226
+ @custom_spelling = custom_spelling if custom_spelling != OMIT
227
+ @disfluencies = disfluencies if disfluencies != OMIT
228
+ @sentiment_analysis = sentiment_analysis if sentiment_analysis != OMIT
229
+ @auto_chapters = auto_chapters if auto_chapters != OMIT
230
+ @entity_detection = entity_detection if entity_detection != OMIT
231
+ @speech_threshold = speech_threshold if speech_threshold != OMIT
232
+ @summarization = summarization if summarization != OMIT
233
+ @summary_model = summary_model if summary_model != OMIT
234
+ @summary_type = summary_type if summary_type != OMIT
235
+ @custom_topics = custom_topics if custom_topics != OMIT
236
+ @topics = topics if topics != OMIT
136
237
  @additional_properties = additional_properties
238
+ @_field_set = {
239
+ "language_code": language_code,
240
+ "punctuate": punctuate,
241
+ "format_text": format_text,
242
+ "dual_channel": dual_channel,
243
+ "speech_model": speech_model,
244
+ "webhook_url": webhook_url,
245
+ "webhook_auth_header_name": webhook_auth_header_name,
246
+ "webhook_auth_header_value": webhook_auth_header_value,
247
+ "auto_highlights": auto_highlights,
248
+ "audio_start_from": audio_start_from,
249
+ "audio_end_at": audio_end_at,
250
+ "word_boost": word_boost,
251
+ "boost_param": boost_param,
252
+ "filter_profanity": filter_profanity,
253
+ "redact_pii": redact_pii,
254
+ "redact_pii_audio": redact_pii_audio,
255
+ "redact_pii_audio_quality": redact_pii_audio_quality,
256
+ "redact_pii_policies": redact_pii_policies,
257
+ "redact_pii_sub": redact_pii_sub,
258
+ "speaker_labels": speaker_labels,
259
+ "speakers_expected": speakers_expected,
260
+ "content_safety": content_safety,
261
+ "content_safety_confidence": content_safety_confidence,
262
+ "iab_categories": iab_categories,
263
+ "language_detection": language_detection,
264
+ "custom_spelling": custom_spelling,
265
+ "disfluencies": disfluencies,
266
+ "sentiment_analysis": sentiment_analysis,
267
+ "auto_chapters": auto_chapters,
268
+ "entity_detection": entity_detection,
269
+ "speech_threshold": speech_threshold,
270
+ "summarization": summarization,
271
+ "summary_model": summary_model,
272
+ "summary_type": summary_type,
273
+ "custom_topics": custom_topics,
274
+ "topics": topics
275
+ }.reject do |_k, v|
276
+ v == OMIT
277
+ end
137
278
  end
138
279
 
139
280
  # Deserialize a JSON object to an instance of TranscriptOptionalParams
140
281
  #
141
- # @param json_object [JSON]
142
- # @return [Transcripts::TranscriptOptionalParams]
282
+ # @param json_object [String]
283
+ # @return [AssemblyAI::Transcripts::TranscriptOptionalParams]
143
284
  def self.from_json(json_object:)
144
285
  struct = JSON.parse(json_object, object_class: OpenStruct)
145
286
  parsed_json = JSON.parse(json_object)
146
- speech_model = struct.speech_model
147
- language_code = struct.language_code
148
- punctuate = struct.punctuate
149
- format_text = struct.format_text
150
- dual_channel = struct.dual_channel
151
- webhook_url = struct.webhook_url
152
- webhook_auth_header_name = struct.webhook_auth_header_name
153
- webhook_auth_header_value = struct.webhook_auth_header_value
154
- auto_highlights = struct.auto_highlights
155
- audio_start_from = struct.audio_start_from
156
- audio_end_at = struct.audio_end_at
157
- word_boost = struct.word_boost
158
- boost_param = struct.boost_param
159
- filter_profanity = struct.filter_profanity
160
- redact_pii = struct.redact_pii
161
- redact_pii_audio = struct.redact_pii_audio
162
- redact_pii_audio_quality = struct.redact_pii_audio_quality
163
- redact_pii_policies = struct.redact_pii_policies
164
- redact_pii_sub = struct.redact_pii_sub
165
- speaker_labels = struct.speaker_labels
166
- speakers_expected = struct.speakers_expected
167
- content_safety = struct.content_safety
168
- content_safety_confidence = struct.content_safety_confidence
169
- iab_categories = struct.iab_categories
170
- language_detection = struct.language_detection
287
+ language_code = struct["language_code"]
288
+ punctuate = struct["punctuate"]
289
+ format_text = struct["format_text"]
290
+ dual_channel = struct["dual_channel"]
291
+ speech_model = struct["speech_model"]
292
+ webhook_url = struct["webhook_url"]
293
+ webhook_auth_header_name = struct["webhook_auth_header_name"]
294
+ webhook_auth_header_value = struct["webhook_auth_header_value"]
295
+ auto_highlights = struct["auto_highlights"]
296
+ audio_start_from = struct["audio_start_from"]
297
+ audio_end_at = struct["audio_end_at"]
298
+ word_boost = struct["word_boost"]
299
+ boost_param = struct["boost_param"]
300
+ filter_profanity = struct["filter_profanity"]
301
+ redact_pii = struct["redact_pii"]
302
+ redact_pii_audio = struct["redact_pii_audio"]
303
+ redact_pii_audio_quality = struct["redact_pii_audio_quality"]
304
+ redact_pii_policies = struct["redact_pii_policies"]
305
+ redact_pii_sub = struct["redact_pii_sub"]
306
+ speaker_labels = struct["speaker_labels"]
307
+ speakers_expected = struct["speakers_expected"]
308
+ content_safety = struct["content_safety"]
309
+ content_safety_confidence = struct["content_safety_confidence"]
310
+ iab_categories = struct["iab_categories"]
311
+ language_detection = struct["language_detection"]
171
312
  custom_spelling = parsed_json["custom_spelling"]&.map do |v|
172
313
  v = v.to_json
173
- Transcripts::TranscriptCustomSpelling.from_json(json_object: v)
314
+ AssemblyAI::Transcripts::TranscriptCustomSpelling.from_json(json_object: v)
174
315
  end
175
- disfluencies = struct.disfluencies
176
- sentiment_analysis = struct.sentiment_analysis
177
- auto_chapters = struct.auto_chapters
178
- entity_detection = struct.entity_detection
179
- speech_threshold = struct.speech_threshold
180
- summarization = struct.summarization
181
- summary_model = struct.summary_model
182
- summary_type = struct.summary_type
183
- custom_topics = struct.custom_topics
184
- topics = struct.topics
185
- new(speech_model: speech_model, language_code: language_code, punctuate: punctuate, format_text: format_text,
186
- dual_channel: dual_channel, webhook_url: webhook_url, webhook_auth_header_name: webhook_auth_header_name, webhook_auth_header_value: webhook_auth_header_value, auto_highlights: auto_highlights, audio_start_from: audio_start_from, audio_end_at: audio_end_at, word_boost: word_boost, boost_param: boost_param, filter_profanity: filter_profanity, redact_pii: redact_pii, redact_pii_audio: redact_pii_audio, redact_pii_audio_quality: redact_pii_audio_quality, redact_pii_policies: redact_pii_policies, redact_pii_sub: redact_pii_sub, speaker_labels: speaker_labels, speakers_expected: speakers_expected, content_safety: content_safety, content_safety_confidence: content_safety_confidence, iab_categories: iab_categories, language_detection: language_detection, custom_spelling: custom_spelling, disfluencies: disfluencies, sentiment_analysis: sentiment_analysis, auto_chapters: auto_chapters, entity_detection: entity_detection, speech_threshold: speech_threshold, summarization: summarization, summary_model: summary_model, summary_type: summary_type, custom_topics: custom_topics, topics: topics, additional_properties: struct)
316
+ disfluencies = struct["disfluencies"]
317
+ sentiment_analysis = struct["sentiment_analysis"]
318
+ auto_chapters = struct["auto_chapters"]
319
+ entity_detection = struct["entity_detection"]
320
+ speech_threshold = struct["speech_threshold"]
321
+ summarization = struct["summarization"]
322
+ summary_model = struct["summary_model"]
323
+ summary_type = struct["summary_type"]
324
+ custom_topics = struct["custom_topics"]
325
+ topics = struct["topics"]
326
+ new(
327
+ language_code: language_code,
328
+ punctuate: punctuate,
329
+ format_text: format_text,
330
+ dual_channel: dual_channel,
331
+ speech_model: speech_model,
332
+ webhook_url: webhook_url,
333
+ webhook_auth_header_name: webhook_auth_header_name,
334
+ webhook_auth_header_value: webhook_auth_header_value,
335
+ auto_highlights: auto_highlights,
336
+ audio_start_from: audio_start_from,
337
+ audio_end_at: audio_end_at,
338
+ word_boost: word_boost,
339
+ boost_param: boost_param,
340
+ filter_profanity: filter_profanity,
341
+ redact_pii: redact_pii,
342
+ redact_pii_audio: redact_pii_audio,
343
+ redact_pii_audio_quality: redact_pii_audio_quality,
344
+ redact_pii_policies: redact_pii_policies,
345
+ redact_pii_sub: redact_pii_sub,
346
+ speaker_labels: speaker_labels,
347
+ speakers_expected: speakers_expected,
348
+ content_safety: content_safety,
349
+ content_safety_confidence: content_safety_confidence,
350
+ iab_categories: iab_categories,
351
+ language_detection: language_detection,
352
+ custom_spelling: custom_spelling,
353
+ disfluencies: disfluencies,
354
+ sentiment_analysis: sentiment_analysis,
355
+ auto_chapters: auto_chapters,
356
+ entity_detection: entity_detection,
357
+ speech_threshold: speech_threshold,
358
+ summarization: summarization,
359
+ summary_model: summary_model,
360
+ summary_type: summary_type,
361
+ custom_topics: custom_topics,
362
+ topics: topics,
363
+ additional_properties: struct
364
+ )
187
365
  end
188
366
 
189
367
  # Serialize an instance of TranscriptOptionalParams to a JSON object
190
368
  #
191
- # @return [JSON]
369
+ # @return [String]
192
370
  def to_json(*_args)
193
- {
194
- "speech_model": @speech_model,
195
- "language_code": @language_code,
196
- "punctuate": @punctuate,
197
- "format_text": @format_text,
198
- "dual_channel": @dual_channel,
199
- "webhook_url": @webhook_url,
200
- "webhook_auth_header_name": @webhook_auth_header_name,
201
- "webhook_auth_header_value": @webhook_auth_header_value,
202
- "auto_highlights": @auto_highlights,
203
- "audio_start_from": @audio_start_from,
204
- "audio_end_at": @audio_end_at,
205
- "word_boost": @word_boost,
206
- "boost_param": @boost_param,
207
- "filter_profanity": @filter_profanity,
208
- "redact_pii": @redact_pii,
209
- "redact_pii_audio": @redact_pii_audio,
210
- "redact_pii_audio_quality": @redact_pii_audio_quality,
211
- "redact_pii_policies": @redact_pii_policies,
212
- "redact_pii_sub": @redact_pii_sub,
213
- "speaker_labels": @speaker_labels,
214
- "speakers_expected": @speakers_expected,
215
- "content_safety": @content_safety,
216
- "content_safety_confidence": @content_safety_confidence,
217
- "iab_categories": @iab_categories,
218
- "language_detection": @language_detection,
219
- "custom_spelling": @custom_spelling,
220
- "disfluencies": @disfluencies,
221
- "sentiment_analysis": @sentiment_analysis,
222
- "auto_chapters": @auto_chapters,
223
- "entity_detection": @entity_detection,
224
- "speech_threshold": @speech_threshold,
225
- "summarization": @summarization,
226
- "summary_model": @summary_model,
227
- "summary_type": @summary_type,
228
- "custom_topics": @custom_topics,
229
- "topics": @topics
230
- }.to_json
371
+ @_field_set&.to_json
231
372
  end
232
373
 
233
- # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
374
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
375
+ # hash and check each fields type against the current object's property
376
+ # definitions.
234
377
  #
235
378
  # @param obj [Object]
236
379
  # @return [Void]
237
380
  def self.validate_raw(obj:)
238
- obj.speech_model&.is_a?(Transcripts::SpeechModel) != false || raise("Passed value for field obj.speech_model is not the expected type, validation failed.")
239
- obj.language_code&.is_a?(Transcripts::TranscriptLanguageCode) != false || raise("Passed value for field obj.language_code is not the expected type, validation failed.")
381
+ obj.language_code&.is_a?(AssemblyAI::Transcripts::TranscriptLanguageCode) != false || raise("Passed value for field obj.language_code is not the expected type, validation failed.")
240
382
  obj.punctuate&.is_a?(Boolean) != false || raise("Passed value for field obj.punctuate is not the expected type, validation failed.")
241
383
  obj.format_text&.is_a?(Boolean) != false || raise("Passed value for field obj.format_text is not the expected type, validation failed.")
242
384
  obj.dual_channel&.is_a?(Boolean) != false || raise("Passed value for field obj.dual_channel is not the expected type, validation failed.")
385
+ obj.speech_model&.is_a?(AssemblyAI::Transcripts::SpeechModel) != false || raise("Passed value for field obj.speech_model is not the expected type, validation failed.")
243
386
  obj.webhook_url&.is_a?(String) != false || raise("Passed value for field obj.webhook_url is not the expected type, validation failed.")
244
387
  obj.webhook_auth_header_name&.is_a?(String) != false || raise("Passed value for field obj.webhook_auth_header_name is not the expected type, validation failed.")
245
388
  obj.webhook_auth_header_value&.is_a?(String) != false || raise("Passed value for field obj.webhook_auth_header_value is not the expected type, validation failed.")
@@ -247,13 +390,13 @@ module AssemblyAI
247
390
  obj.audio_start_from&.is_a?(Integer) != false || raise("Passed value for field obj.audio_start_from is not the expected type, validation failed.")
248
391
  obj.audio_end_at&.is_a?(Integer) != false || raise("Passed value for field obj.audio_end_at is not the expected type, validation failed.")
249
392
  obj.word_boost&.is_a?(Array) != false || raise("Passed value for field obj.word_boost is not the expected type, validation failed.")
250
- obj.boost_param&.is_a?(Transcripts::TranscriptBoostParam) != false || raise("Passed value for field obj.boost_param is not the expected type, validation failed.")
393
+ obj.boost_param&.is_a?(AssemblyAI::Transcripts::TranscriptBoostParam) != false || raise("Passed value for field obj.boost_param is not the expected type, validation failed.")
251
394
  obj.filter_profanity&.is_a?(Boolean) != false || raise("Passed value for field obj.filter_profanity is not the expected type, validation failed.")
252
395
  obj.redact_pii&.is_a?(Boolean) != false || raise("Passed value for field obj.redact_pii is not the expected type, validation failed.")
253
396
  obj.redact_pii_audio&.is_a?(Boolean) != false || raise("Passed value for field obj.redact_pii_audio is not the expected type, validation failed.")
254
- obj.redact_pii_audio_quality&.is_a?(Transcripts::RedactPiiAudioQuality) != false || raise("Passed value for field obj.redact_pii_audio_quality is not the expected type, validation failed.")
397
+ obj.redact_pii_audio_quality&.is_a?(AssemblyAI::Transcripts::RedactPiiAudioQuality) != false || raise("Passed value for field obj.redact_pii_audio_quality is not the expected type, validation failed.")
255
398
  obj.redact_pii_policies&.is_a?(Array) != false || raise("Passed value for field obj.redact_pii_policies is not the expected type, validation failed.")
256
- obj.redact_pii_sub&.is_a?(Transcripts::SubstitutionPolicy) != false || raise("Passed value for field obj.redact_pii_sub is not the expected type, validation failed.")
399
+ obj.redact_pii_sub&.is_a?(AssemblyAI::Transcripts::SubstitutionPolicy) != false || raise("Passed value for field obj.redact_pii_sub is not the expected type, validation failed.")
257
400
  obj.speaker_labels&.is_a?(Boolean) != false || raise("Passed value for field obj.speaker_labels is not the expected type, validation failed.")
258
401
  obj.speakers_expected&.is_a?(Integer) != false || raise("Passed value for field obj.speakers_expected is not the expected type, validation failed.")
259
402
  obj.content_safety&.is_a?(Boolean) != false || raise("Passed value for field obj.content_safety is not the expected type, validation failed.")
@@ -267,8 +410,8 @@ module AssemblyAI
267
410
  obj.entity_detection&.is_a?(Boolean) != false || raise("Passed value for field obj.entity_detection is not the expected type, validation failed.")
268
411
  obj.speech_threshold&.is_a?(Float) != false || raise("Passed value for field obj.speech_threshold is not the expected type, validation failed.")
269
412
  obj.summarization&.is_a?(Boolean) != false || raise("Passed value for field obj.summarization is not the expected type, validation failed.")
270
- obj.summary_model&.is_a?(Transcripts::SummaryModel) != false || raise("Passed value for field obj.summary_model is not the expected type, validation failed.")
271
- obj.summary_type&.is_a?(Transcripts::SummaryType) != false || raise("Passed value for field obj.summary_type is not the expected type, validation failed.")
413
+ obj.summary_model&.is_a?(AssemblyAI::Transcripts::SummaryModel) != false || raise("Passed value for field obj.summary_model is not the expected type, validation failed.")
414
+ obj.summary_type&.is_a?(AssemblyAI::Transcripts::SummaryType) != false || raise("Passed value for field obj.summary_type is not the expected type, validation failed.")
272
415
  obj.custom_topics&.is_a?(Boolean) != false || raise("Passed value for field obj.custom_topics is not the expected type, validation failed.")
273
416
  obj.topics&.is_a?(Array) != false || raise("Passed value for field obj.topics is not the expected type, validation failed.")
274
417
  end