Skip to content

Feature/podcast player#245

Merged
Rizwan-095 merged 19 commits intoopenhome-dev:devfrom
SpkArtZen:feature/podcast_player
Apr 14, 2026
Merged

Feature/podcast player#245
Rizwan-095 merged 19 commits intoopenhome-dev:devfrom
SpkArtZen:feature/podcast_player

Conversation

@SpkArtZen
Copy link
Copy Markdown
Contributor

What does this Ability do?

Suggested Trigger Words

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Checklist

  • Files are in community/my-ability-name/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

@SpkArtZen SpkArtZen requested a review from a team as a code owner April 10, 2026 14:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

🔀 Branch Merge Check

PR direction: feature/podcast_playerdev

Passedfeature/podcast_playerdev is a valid merge direction

@github-actions github-actions bot added the community-ability Community-contributed ability label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✅ Ability Validation Passed

📋 Validating: community/podcast-player
  ✅ All checks passed!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/podcast-player/main.py

✅ Flake8 — Passed

✅ All checks passed!

@uzair401
Copy link
Copy Markdown
Contributor

Changes made

Refactored the podcast player with the following improvements:

Music mode & streaming — Enabled session-level music mode so the system doesn't try to transcribe podcast audio as user speech (Music Mode docs). Switched from sync requests to async httpx streaming with stop/pause event handling between chunks, allowing users to control playback through voice. See Audio Streaming for the SDK streaming pattern.

Intent classification — Restructured the LLM prompt to extract podcast, guest, and topic as separate fields instead of a flat query string. So "Play Lex Fridman with Jensen Huang about NVIDIA" now correctly routes to a scoped episode search rather than dumping everything into one global search. Added markdown fence stripping and a structured prompt format (context → rules → examples) to reduce hallucination. See LLM as Intent Router and Using the LLM as a Router for the recommended pattern.

Episode selection — Replaced the substring-based match_choice with an LLM-based select_from_options that understands spoken references like "the one with Jensen." Every selection point supports play, search again, or exit as valid responses.

Scoped episode search — The ability now resolves the podcast to an ID first, then searches episodes scoped to that podcast via the ListenNotes ocid parameter. This eliminates irrelevant results from unrelated shows. Falls back gracefully if the scoped search returns nothing.

Voice UX — Added context-aware filler speech before API calls (e.g., "Searching for Lex Fridman with Jensen Huang about NVIDIA") as recommended in Fill the Silence. Reads trigger context via wait_for_complete_transcription to skip the generic prompt when the user already said what they want (Reading Trigger Context). Continue prompts after playback route through intent classification so follow-up requests work naturally. Single episode match plays directly without asking for confirmation.

Reliability — All API methods wrapped in try/except with tagged logging via editor_logging_handler (Logging docs). API key fetched once and stored in state. resume_normal_flow() in a finally block as required by Flow Control.

For future PRs, please review and follow these best practices from the docs — they'll help get contributions merged faster.

Copy link
Copy Markdown
Contributor

@uzair401 uzair401 left a comment

Choose a reason for hiding this comment

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

Approved for the community.

We will proceed with adopting this ability for a 30-day evaluation period to monitor performance, identify any bugs, and implement any necessary fixes or optimizations. If the ability proves stable and meets our quality standards during this period, we will move forward with publishing it to the marketplace, ensuring full credit is given to the original author for their work and contribution.

We truly appreciate your effort and encourage you to continue developing and submitting new abilities. Contributions like yours help strengthen the ecosystem, and we look forward to seeing more of your work.

@Rizwan-095 Rizwan-095 merged commit 3494fab into openhome-dev:dev Apr 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants