Skip to content

feat:Expand AssemblyAI schema with advanced transcript features#149

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202603030444
Mar 3, 2026
Merged

feat:Expand AssemblyAI schema with advanced transcript features#149
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202603030444

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Mar 3, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Enhanced language detection with confidence scores and code switching support
    • Speech understanding capabilities including translation, speaker identification, and custom formatting
    • Advanced transcript analysis: auto highlights, content moderation, sentiment analysis, entity extraction, and chapters
    • Comprehensive PII redaction options for audio content
    • Multichannel audio support
    • Improved error reporting for file access issues

@HavenDV HavenDV merged commit 30b7f23 into main Mar 3, 2026
1 of 3 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202603030444 branch March 3, 2026 04:45
@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Walkthrough

This PR significantly expands the AssemblyAI OpenAPI schema to introduce advanced transcript processing features including multilingual language detection, PII redaction with audio options, content safety/moderation, speech understanding capabilities (translation, speaker identification, custom formatting), and structured transcript elements like chapters and entities. LeMUR endpoints are disabled, and new error handling for 403 responses is added.

Changes

Cohort / File(s) Summary
LeMUR Endpoint Visibility
src/libs/AssemblyAI/openapi.yaml
LeMUR-related operations commented out across multiple path sections, effectively removing them from the public API surface.
Language Detection & Multilingual Support
src/libs/AssemblyAI/openapi.yaml
Added language_codes, language_confidence, language_confidence_threshold, code_switching, and expanded TranscriptLanguageCode enum with extended language mappings to support multilingual transcript processing.
PII Redaction Features
src/libs/AssemblyAI/openapi.yaml
Introduced redact_pii, redact_pii_audio, redact_pii_audio_quality, redact_pii_policies, redact_pii_sub, and redact_pii_audio_options (with return_redacted_no_speech_audio) for comprehensive PII masking configurations.
Content Safety & Moderation
src/libs/AssemblyAI/openapi.yaml
Added content_safety with content_safety_labels, introduced ContentSafetyLabel, ContentSafetyLabelResult, and ContentModeration schemas to expose content moderation results.
Speech Understanding (Translation & Speaker ID)
src/libs/AssemblyAI/openapi.yaml
Introduced speech_understanding with translation, speaker_identification, and custom_formatting request bodies; added corresponding TranslationResponse, SpeakerIdentificationResponse, and CustomFormattingResponse schemas with translated_texts support.
Speech Model & Utterance Enhancements
src/libs/AssemblyAI/openapi.yaml
Replaced single speech_model with speech_models array, added speech_model_used, multichannel, prompt, temperature, and speech_threshold parameters to TranscriptParams and TranscriptOptionalParams.
Transcript Structure Expansions
src/libs/AssemblyAI/openapi.yaml
Added chapters (Chapter array), entities (Entity[]), auto_highlights with AutoHighlightsResult, utterances with TranscriptUtterance enhancements including translated_texts, TranscriptWord, and TranscriptSentence schemas.
Error Handling & Webhook Updates
src/libs/AssemblyAI/openapi.yaml
Added CannotAccessUploadedFile error schema with 403 mappings on upload and redacted-audio GET paths; reintroduced webhook_url and webhook_auth_header fields; added EU/server hints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Poem

🐰 Hops through schemas with linguistic flair,
PII masking, moderation everywhere,
Speech understanding blooms in structured arrays,
Multilingual chapters brighten transcript days,
A fluffy YAML revolution, handled with care! 📜✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202603030444

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Expand AssemblyAI schema with advanced transcript features Mar 3, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
src/libs/AssemblyAI/openapi.yaml (1)

6120-6129: Enforce known_values when speaker_type=role in-schema.

Line 6128 states known_values is required for speaker_type: role, but the schema currently doesn’t enforce it. Add conditional validation (if/then or oneOf) to prevent invalid requests passing schema validation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 6120 - 6129, The schema
currently declares speaker_type and known_values but doesn't enforce that
known_values is present when speaker_type is "role"; update the OpenAPI schema
for the object containing speaker_type/known_values to add a conditional
validation (use an if/then block) — use an if that checks
properties.speaker_type.const = "role" and a then that adds required:
["known_values"] and (optionally) enforces items.maxLength: 35 for known_values;
reference the existing speaker_type and known_values definitions when adding the
if/then so the schema rejects requests missing known_values when speaker_type is
"role".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/libs/AssemblyAI/openapi.yaml`:
- Around line 1582-1583: Fix the grammar in the webhook description strings:
locate the occurrences of the sentence fragment "We sends two different types of
webhook requests." (appearing in openapi.yaml around the webhook description
entries) and change "We sends" to "We send" in both places (the entry containing
the transcript/redacted-audio description and the similar entry near lines
3084-3085) so the descriptions read "We send two different types of webhook
requests."
- Around line 1241-1243: The examples for the TranscriptOptionalParams schema
are invalid because speech_models is now required; update each example block
referenced (the two examples around lines ~1613–1661 and ~1681–1730) to include
a valid speech_models property that matches the schema (e.g., provide an array
or object as defined by speech_models); locate the examples near the
TranscriptOptionalParams schema and add the required speech_models field with an
appropriate example value to each example so they validate against the schema.
- Around line 3144-3153: The translated_texts schema currently defines a fixed
property "language_code" which contradicts "keyed by language code"; update the
"translated_texts" schema to allow dynamic language keys by removing the fixed
"language_code" property and adding additionalProperties with type: string (same
pattern used by the Utterance schema) so entries like {"es": "...", "de": "..."}
are accepted; target the translated_texts schema in the OpenAPI file when making
this change.
- Line 45: Add a 403 response for the POST /v2/transcript operation in
src/libs/AssemblyAI/openapi.yaml to mirror the existing 403 declared for
/v2/upload: create a response named CannotAccessUploadedFile (or reuse that
response object) with the same description/message ("Cannot access uploaded
file" / 403) and schema as used by the /v2/upload 403 response so the contract
reflects the documented warning about using mismatched project API keys when
transcribing uploaded files.
- Around line 3141-3143: Remove the invalid required constraint placed under the
Transcript schema's topics array: locate the Transcript schema's "topics"
property and delete the misplaced "required: - request" block (the constraint
referencing "request" belongs to the speech_understanding object schema, not a
string array). Ensure no other array-type properties include a "required" field
and keep the correct "required: [request]" only within the speech_understanding
object schema where "request" is an actual property.

---

Nitpick comments:
In `@src/libs/AssemblyAI/openapi.yaml`:
- Around line 6120-6129: The schema currently declares speaker_type and
known_values but doesn't enforce that known_values is present when speaker_type
is "role"; update the OpenAPI schema for the object containing
speaker_type/known_values to add a conditional validation (use an if/then block)
— use an if that checks properties.speaker_type.const = "role" and a then that
adds required: ["known_values"] and (optionally) enforces items.maxLength: 35
for known_values; reference the existing speaker_type and known_values
definitions when adding the if/then so the schema rejects requests missing
known_values when speaker_type is "role".

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a441d0 and c3f8779.

⛔ Files ignored due to path filters (130)
  • src/libs/AssemblyAI/Generated/AnyOf.2.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI..JsonSerializerContext.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.IAssemblyAIClient.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.GetLemurResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.LemurQuestionAnswer.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.LemurSummary.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.LemurTask.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.PurgeLemurRequestData.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ILeMURClient.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ITranscriptClient.DeleteTranscript.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ITranscriptClient.GetRedactedAudio.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ITranscriptClient.ListTranscripts.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.ITranscriptClient.UploadFile.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.ErrorStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.OneOf3.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.SpeakerIdentificationRequestBodySpeakerIdentificationSpeakerType.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.SpeakerIdentificationRequestBodySpeakerIdentificationSpeakerTypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.SpeechModel.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.GetLemurResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.LemurQuestionAnswer.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.LemurSummary.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.LemurTask.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.PurgeLemurRequestData.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.LeMURClient.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.AutoHighlightResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.AutoHighlightsResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.AutoHighlightsResult2.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.AutoHighlightsResult2.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Chapter.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ContentSafetyLabel.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ContentSafetyLabelResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ContentSafetyLabelsResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CreateRealtimeTemporaryTokenParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBody.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBodyCustomFormatting.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBodyCustomFormatting.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponseCustomFormatting.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponseCustomFormatting.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponseCustomFormattingMapping.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingResponseCustomFormattingMapping.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Entity.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Error.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ErrorStatus.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurActionItemsParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurActionItemsResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurBaseParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurBaseResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurQuestion.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurQuestionAnswer.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurQuestionAnswerParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurQuestionAnswerResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurStringResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurSummaryParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurSummaryResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ListTranscriptParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.PageDetails.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ParagraphsResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.PurgeLemurRequestDataResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.RealtimeTemporaryTokenResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.RedactedAudioNotification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.RedactedAudioResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SentencesResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SentimentAnalysisResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SeverityScoreSummary.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBody.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBodySpeakerIdentification.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBodySpeakerIdentification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBodySpeakerIdentificationSpeakerType.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationResponseSpeakerIdentification.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationResponseSpeakerIdentification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeechModel.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Timestamp.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TopicDetectionModelResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TopicDetectionResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TopicDetectionResultLabel.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptCustomSpelling.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptLanguageDetectionOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptList.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptListItem.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsLanguageDetectionOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeakerOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstanding.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstanding.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptParagraph.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptReadyNotification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSentence.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstanding.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstanding.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptTranslatedTexts.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptTranslatedTexts.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptUtterance.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptUtteranceTranslatedTexts.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptUtteranceTranslatedTexts.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptWebhookNotification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptWord.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBody.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBodyTranslation.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBodyTranslation.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationResponseTranslation.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationResponseTranslation.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.UploadedFile.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.WordSearchMatch.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.WordSearchResponse.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.DeleteTranscript.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.GetRedactedAudio.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.GetSubtitles.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.ListTranscripts.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.UploadFile.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.TranscriptClient.WordSearch.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/OneOf.2.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/OneOf.3.Json.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/OneOf.3.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/AssemblyAI/openapi.yaml

Upload a media file to AssemblyAI's servers.

<Note>To upload a media file to our EU server, replace `api.assemblyai.com` with `api.eu.assemblyai.com`.</Note>
<Warning>Requests to transcribe uploaded files must use an API key from the same project as the key that was used to upload the file. If you use an API key from a different project you will get a `403` error and "Cannot access uploaded file" message.</Warning>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check the file size and read the relevant sections
wc -l src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 98


🏁 Script executed:

# Read lines around line 45 to see the warning and endpoint definition
sed -n '35,55p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 891


🏁 Script executed:

# Read lines around 67-68 to see the /v2/upload 403 response
sed -n '60,75p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 615


🏁 Script executed:

# Find the POST /v2/transcript endpoint and check its responses section
sed -n '1,150p' src/libs/AssemblyAI/openapi.yaml | grep -n -A 20 "^  /v2/transcript:"

Repository: tryAGI/AssemblyAI

Length of output: 842


🏁 Script executed:

# Let's get a broader view of the POST /v2/transcript responses section
# Search for the entire /v2/transcript endpoint and its responses
rg -n "^  /v2/transcript:" -A 50 src/libs/AssemblyAI/openapi.yaml | head -70

Repository: tryAGI/AssemblyAI

Length of output: 2232


🏁 Script executed:

# Get the complete responses section for POST /v2/transcript
sed -n '99,140p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 1705


Add 403 CannotAccessUploadedFile response to POST /v2/transcript.

The warning at line 45 describes a 403 error that occurs when transcribing uploaded files with a different project's API key. However, the 403 response is declared only on /v2/upload, not on POST /v2/transcript where the error would actually occur. Add the 403 response to the /v2/transcript endpoint to match the documented behavior.

Suggested contract fix
  /v2/transcript:
    post:
      responses:
        "200":
          x-label: Transcript created
          description: Transcript created and queued for processing
+       "403":
+         $ref: "#/components/responses/CannotAccessUploadedFile"
        "400":
          $ref: "#/components/responses/BadRequest"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` at line 45, Add a 403 response for the POST
/v2/transcript operation in src/libs/AssemblyAI/openapi.yaml to mirror the
existing 403 declared for /v2/upload: create a response named
CannotAccessUploadedFile (or reuse that response object) with the same
description/message ("Cannot access uploaded file" / 403) and schema as used by
the /v2/upload 403 response so the contract reflects the documented warning
about using mismatched project API keys when transcribing uploaded files.

Comment on lines +1241 to 1243
required:
- speech_models
properties:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check the file exists and get its total line count
wc -l src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 98


🏁 Script executed:

# Read lines 1241-1243 to see the schema requirement definition
sed -n '1235,1250p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 588


🏁 Script executed:

# Read the first example at lines 1613-1661
sed -n '1610,1665p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 1837


🏁 Script executed:

# Read the second example at lines 1681-1730
sed -n '1675,1735p' src/libs/AssemblyAI/openapi.yaml

Repository: tryAGI/AssemblyAI

Length of output: 2099


Examples are invalid after making speech_models required.

The speech_models field is marked as required in the TranscriptOptionalParams schema (line 1242), but both examples omit it:

  • Lines 1613–1661: Missing speech_models
  • Lines 1681–1730: Missing speech_models

Both examples should include speech_models to comply with the schema requirement.

Suggested example fix
       example:
         {
+          speech_models: ["your_preferred_model"],
           speech_model: null,
           language_code: "en_us",
           ...
         }

      example:
        {
+         speech_models: ["your_preferred_model"],
          speech_model: null,
          language_code: "en_us",
          ...
        }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 1241 - 1243, The examples for
the TranscriptOptionalParams schema are invalid because speech_models is now
required; update each example block referenced (the two examples around lines
~1613–1661 and ~1681–1730) to include a valid speech_models property that
matches the schema (e.g., provide an array or object as defined by
speech_models); locate the examples near the TranscriptOptionalParams schema and
add the required speech_models field with an appropriate example value to each
example so they validate against the schema.

Comment on lines +1582 to +1583
We sends two different types of webhook requests.
One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix grammar in webhook description.

Line 1582 and Line 3084 use “We sends…”. Change to “We send…”.

Also applies to: 3084-3085

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 1582 - 1583, Fix the grammar
in the webhook description strings: locate the occurrences of the sentence
fragment "We sends two different types of webhook requests." (appearing in
openapi.yaml around the webhook description entries) and change "We sends" to
"We send" in both places (the entry containing the transcript/redacted-audio
description and the similar entry near lines 3084-3085) so the descriptions read
"We send two different types of webhook requests."

Comment on lines +3141 to +3143
required:
- request

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the context around lines 3141-3143
sed -n '3130,3160p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 1072


🏁 Script executed:

# Look at the broader context to see what schema/section this is part of
sed -n '3100,3160p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 2490


🏁 Script executed:

# Look further up to find the schema name and understand the parent structure
sed -n '3050,3110p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 3141


🏁 Script executed:

# Look further up to find the schema name
sed -n '3000,3060p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 3165


🏁 Script executed:

# Look further up to find the schema definition name
sed -n '2900,2950p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 2713


🏁 Script executed:

# Find the schema name by looking for the properties declaration
sed -n '2850,2910p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 3331


🏁 Script executed:

# Find the schema definition name
sed -n '2800,2860p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 2942


🏁 Script executed:

# Find the schema definition name
sed -n '2700,2810p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 5193


🏁 Script executed:

# Find the schema name
sed -n '2600,2710p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 4445


🏁 Script executed:

# Search for speech_understanding schema definition
rg -n "speech_understanding" src/libs/AssemblyAI/openapi.yaml | head -20

Repository: tryAGI/AssemblyAI

Length of output: 204


🏁 Script executed:

# Look at the speech_understanding definitions to understand their structure
sed -n '1520,1570p' src/libs/AssemblyAI/openapi.yaml | cat -n

Repository: tryAGI/AssemblyAI

Length of output: 2238


🏁 Script executed:

# Verify the exact indentation and context around lines 3141-3143
sed -n '3138,3148p' src/libs/AssemblyAI/openapi.yaml | cat -A

Repository: tryAGI/AssemblyAI

Length of output: 337


Remove misplaced required constraint under topics property.

The required: [request] constraint on lines 3141–3143 is incorrectly placed under the topics array property in the Transcript schema. Array types in OpenAPI do not support a required field, and "request" is not a valid constraint for a string array. This appears to be leftover code from the speech_understanding schema, where required: [request] is properly used to mark the request property as mandatory within an object type.

Suggested cleanup
         topics:
           x-label: Topics
           description: This parameter does not currently have any functionality attached to it.
           type: array
           items:
             x-label: Topic
             type: string
           deprecated: true
-
-          required:
-            - request
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 3141 - 3143, Remove the
invalid required constraint placed under the Transcript schema's topics array:
locate the Transcript schema's "topics" property and delete the misplaced
"required: - request" block (the constraint referencing "request" belongs to the
speech_understanding object schema, not a string array). Ensure no other
array-type properties include a "required" field and keep the correct "required:
[request]" only within the speech_understanding object schema where "request" is
an actual property.

Comment on lines +3144 to +3153
translated_texts:
# x-label: Translated text
type: object
description: Translated text keyed by language code
properties:
language_code:
x-label: Language code
type: string
description: Translated text for this language code

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and read the specific lines
file_path="src/libs/AssemblyAI/openapi.yaml"
if [ -f "$file_path" ]; then
  wc -l "$file_path"
  echo "--- Lines 3144-3153 ---"
  sed -n '3144,3153p' "$file_path"
  echo ""
  echo "--- Context around these lines (3140-3160) ---"
  sed -n '3140,3160p' "$file_path"
else
  echo "File not found: $file_path"
fi

Repository: tryAGI/AssemblyAI

Length of output: 1009


🏁 Script executed:

# Search for other instances of similar patterns in the schema
# to understand if translated_texts should be a map or fixed property
rg "translated_texts|additionalProperties" src/libs/AssemblyAI/openapi.yaml -A 5 -B 2

Repository: tryAGI/AssemblyAI

Length of output: 15214


Use additionalProperties to support dynamic language code keys.

The description states "keyed by language code", but the current schema defines a fixed language_code property instead. This mismatch prevents the field from accepting multiple language translations (e.g., {"es": "...", "de": "..."}). The Utterance schema in this same file correctly implements this pattern using additionalProperties: type: string, which should be applied here as well.

Suggested schema fix
         translated_texts:
-          # x-label: Translated text
+          x-label: Translated texts
           type: object
           description: Translated text keyed by language code
-          properties:
-            language_code:
-              x-label: Language code
-              type: string
-              description: Translated text for this language code
+          additionalProperties:
+            type: string
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 3144 - 3153, The
translated_texts schema currently defines a fixed property "language_code" which
contradicts "keyed by language code"; update the "translated_texts" schema to
allow dynamic language keys by removing the fixed "language_code" property and
adding additionalProperties with type: string (same pattern used by the
Utterance schema) so entries like {"es": "...", "de": "..."} are accepted;
target the translated_texts schema in the OpenAPI file when making this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant