Skip to content

[ContentUnderstanding] Align audio content range samples with video scenarios#45792

Merged
changjian-wang merged 2 commits intochangjian-wang/add-contentrange-samples-doc-audio-videofrom
copilot/sub-pr-45679-again
Mar 19, 2026
Merged

[ContentUnderstanding] Align audio content range samples with video scenarios#45792
changjian-wang merged 2 commits intochangjian-wang/add-contentrange-samples-doc-audio-videofrom
copilot/sub-pr-45679-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Audio content range samples used different scenarios ("5000-", "2000-8000") than the video samples. Updated to use the same 4 canonical patterns across both modalities for consistency with .NET/Java SDK samples.

Changes

  • sample_analyze_url.py / sample_analyze_url_async.py — Replaced audio content range examples with:
    • "0-5000" — first 5 seconds
    • "10000-" — from 10 seconds onward
    • "1200-3651" — sub-second precision
    • "0-3000,30000-" — combined time ranges
  • test_sample_analyze_url.py — Updated test_sample_analyze_audio_url_with_content_ranges to validate all 4 scenarios with boundary assertions matching the video test structure
# Audio now mirrors video content range patterns:
audio_range_poller = client.begin_analyze(
    analyzer_id="prebuilt-audioSearch",
    inputs=[AnalysisInput(url=audio_url, content_range="0-5000")],
)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…5000, 10000-, 1200-3651, 0-3000,30000-

Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>
Copilot AI changed the title [WIP] [ContentUnderstanding] Add ContentRange samples for document, video, and audio [ContentUnderstanding] Align audio content range samples with video scenarios Mar 19, 2026
Copilot AI requested a review from changjian-wang March 19, 2026 07:57
@changjian-wang changjian-wang marked this pull request as ready for review March 19, 2026 08:09
@changjian-wang changjian-wang merged commit e61e278 into changjian-wang/add-contentrange-samples-doc-audio-video Mar 19, 2026
6 checks passed
@changjian-wang changjian-wang deleted the copilot/sub-pr-45679-again branch March 19, 2026 08:11
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.

2 participants