OpenVoiceOS / ovos-core

OpenVoiceOS Core, the FOSS Artificial Intelligence platform.
https://openvoiceos.org
Apache License 2.0
122 stars 17 forks source link

fix/no_media_skills #517

Closed JarbasAl closed 2 months ago

JarbasAl commented 2 months ago

do not search OCP when no OCP skills are installed

based on chat feedback

j1nx commented 2 months ago

Really like this small making it better type of things. Nice catch!

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.

Project coverage is 75.57%. Comparing base (5b6cb2f) to head (e019156). Report is 1 commits behind head on dev.

Files Patch % Lines
ovos_core/intent_services/ocp_service.py 61.53% 10 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #517 +/- ## ========================================== - Coverage 75.99% 75.57% -0.42% ========================================== Files 15 15 Lines 3020 3042 +22 ========================================== + Hits 2295 2299 +4 - Misses 725 743 +18 ``` | [Flag](https://app.codecov.io/gh/OpenVoiceOS/ovos-core/pull/517/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/OpenVoiceOS/ovos-core/pull/517/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS) | `75.57% <61.53%> (-0.42%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

goldyfruit commented 2 months ago
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.229 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.231 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['what are you', 0.98167485]], 'lang': 'en-us'}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.237 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['what are you', 0.98167485]], 'lang': 'en-us'}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.247 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.250 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f94f6c5d0>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.258 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f94e8d810>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.672 - skills - padacioso:calc_intent:240 - INFO - No match
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.674 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method OCPPipelineMatcher.match_high of <ovos_core.intent_services.ocp_service.OCPPipelineMatcher object at 0x7f9915b850>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.675 - skills - ovos_core.intent_services.padatious_service:_match_level:51 - DEBUG - Padatious Matching confidence > 0.95
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.681 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - padatious_high match: IntentMatch(intent_service='Padatious', intent_type='ovos-skill-personal.OpenVoiceOS:WhatAreYou.intent', intent_data={}, skill_id='ovos-skill-personal.OpenVoiceOS', utterance='what are you')
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.710 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.43813443183898926
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.729 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session

LGTM

JarbasAl commented 2 months ago
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.229 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.231 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['what are you', 0.98167485]], 'lang': 'en-us'}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.237 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['what are you', 0.98167485]], 'lang': 'en-us'}
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.247 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.250 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f94f6c5d0>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.258 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f94e8d810>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.672 - skills - padacioso:calc_intent:240 - INFO - No match
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.674 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method OCPPipelineMatcher.match_high of <ovos_core.intent_services.ocp_service.OCPPipelineMatcher object at 0x7f9915b850>>
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.675 - skills - ovos_core.intent_services.padatious_service:_match_level:51 - DEBUG - Padatious Matching confidence > 0.95
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.681 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - padatious_high match: IntentMatch(intent_service='Padatious', intent_type='ovos-skill-personal.OpenVoiceOS:WhatAreYou.intent', intent_data={}, skill_id='ovos-skill-personal.OpenVoiceOS', utterance='what are you')
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.710 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.43813443183898926
Jun 26 17:37:50 mark2 ovos-core[950]: 2024-06-26 17:37:50.729 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session

LGTM

to test this you would need to ask "play XXXX" with no OCP skills installed, in your logs seems you asked "what are you" so it isnt checking this code path

goldyfruit commented 2 months ago

With media skill:

Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.319 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.321 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.74739248]], 'lang': 'en-us'}
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.325 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.74739248]], 'lang': 'en-us'}
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.337 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.339 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f94f6c5d0>>
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.359 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f94e8d810>>
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.855 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.858 - skills - ovos_core.intent_services.ocp_service:match_high:355 - INFO - OCP exact match: {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.993 - skills - ovos_core.intent_services.ocp_service:classify_media:731 - INFO - OVOSCommonPlay MediaType prediction: radio confidence: 0.42
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.995 - skills - ovos_core.intent_services.ocp_service:classify_media:732 - DEBUG -      utterance: soul radio
Jun 26 19:01:36 mark2 ovos-core[950]: 2024-06-26 19:01:36.996 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - ocp_high match: IntentMatch(intent_service='OCP_intents', intent_type='ocp:play', intent_data={'media_type': <MediaType.RADIO: 7>, 'query': 'soul radio', 'entities': {}, 'skills': [], 'conf': 0.96, 'media_conf': 0.42, 'lang': 'en-us'}, skill_id='ovos.common_play', utterance='soul radio')
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.001 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.6646392345428467
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.051 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.096 - skills - ovos_bus_client.apis.ocp:__init__:876 - DEBUG - Created RADIO query: soul radio
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.219 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.232 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:948 - DEBUG - skill-ovos-local-media.openvoiceos is searching
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.240 - skills - ovos_bus_client.apis.ocp:handle_skill_response:982 - DEBUG - got 0 results from skill-ovos-local-media.openvoiceos
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.243 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1015 - DEBUG - skill-ovos-local-media.openvoiceos finished search
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.745 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1029 - INFO - Received search responses from all skills!
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.824 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.825 - skills - ovos_core.intent_services.ocp_service:_execute_query:941 - DEBUG - OVOSCommonPlay falling back to MediaType.GENERIC
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.868 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.896 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:948 - DEBUG - skill-ovos-news.openvoiceos is searching
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.899 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:948 - DEBUG - skill-ovos-local-media.openvoiceos is searching
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.906 - skills - ovos_bus_client.apis.ocp:handle_skill_response:982 - DEBUG - got 0 results from skill-ovos-local-media.openvoiceos
Jun 26 19:01:37 mark2 ovos-core[950]: 2024-06-26 19:01:37.907 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1015 - DEBUG - skill-ovos-local-media.openvoiceos finished search
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.059 - skills - ovos_bus_client.apis.ocp:handle_skill_response:982 - DEBUG - got 0 results from skill-ovos-news.openvoiceos
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.064 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1015 - DEBUG - skill-ovos-news.openvoiceos finished search
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.409 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1029 - INFO - Received search responses from all skills!
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.471 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.473 - skills - ovos_core.intent_services.ocp_service:_execute_query:948 - DEBUG - Returning 0 search results
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.474 - skills - ovos_core.intent_services.ocp_service:_search:898 - DEBUG - Got 0 results
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.475 - skills - ovos_core.intent_services.ocp_service:filter_results:828 - DEBUG - filtered 0 low confidence results
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.476 - skills - ovos_core.intent_services.ocp_service:filter_results:836 - DEBUG - filtered 0 wrong MediaType results
Jun 26 19:01:38 mark2 ovos-core[950]: 2024-06-26 19:01:38.479 - skills - ovos_core.intent_services.ocp_service:_search:901 - DEBUG - Got 0 usable results
goldyfruit commented 2 months ago

With no media skill:

Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.768 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.781 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.83666778]], 'lang': 'en-us'}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.785 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.83666778]], 'lang': 'en-us'}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.797 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.799 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f6c37be10>>
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.817 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f6c2b4950>>
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.276 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.277 - skills - ovos_core.intent_services.ocp_service:match_high:355 - INFO - OCP exact match: {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.396 - skills - ovos_core.intent_services.ocp_service:classify_media:731 - INFO - OVOSCommonPlay MediaType prediction: radio confidence: 0.42
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.397 - skills - ovos_core.intent_services.ocp_service:classify_media:732 - DEBUG -      utterance: soul radio
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.399 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - ocp_high match: IntentMatch(intent_service='OCP_intents', intent_type='ocp:play', intent_data={'media_type': <MediaType.RADIO: 7>, 'query': 'soul radio', 'entities': {}, 'skills': [], 'conf': 0.96, 'media_conf': 0.42, 'lang': 'en-us'}, skill_id='ovos.common_play', utterance='soul radio')
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.405 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.60793137550354
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.453 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.502 - skills - ovos_bus_client.apis.ocp:__init__:876 - DEBUG - Created RADIO query: soul radio
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.607 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.624 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.626 - skills - ovos_core.intent_services.ocp_service:_execute_query:941 - DEBUG - OVOSCommonPlay falling back to MediaType.GENERIC
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.669 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.687 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:948 - DEBUG - skill-ovos-news.openvoiceos is searching
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.904 - skills - ovos_bus_client.apis.ocp:handle_skill_response:982 - DEBUG - got 0 results from skill-ovos-news.openvoiceos
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.905 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1015 - DEBUG - skill-ovos-news.openvoiceos finished search
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.407 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1029 - INFO - Received search responses from all skills!
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.473 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.475 - skills - ovos_core.intent_services.ocp_service:_execute_query:948 - DEBUG - Returning 0 search results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.477 - skills - ovos_core.intent_services.ocp_service:_search:898 - DEBUG - Got 0 results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.479 - skills - ovos_core.intent_services.ocp_service:filter_results:828 - DEBUG - filtered 0 low confidence results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.481 - skills - ovos_core.intent_services.ocp_service:filter_results:836 - DEBUG - filtered 0 wrong MediaType results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.505 - skills - ovos_core.intent_services.ocp_service:_search:901 - DEBUG - Got 0 usable results
JarbasAl commented 2 months ago

this has news skill installed

DEBUG - skill-ovos-news.openvoiceos is searching

With no media skill:


DEBUG - skill-ovos-news.openvoiceos is searching
goldyfruit commented 2 months ago

Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.277 - skills - ovos_core.intent_services.ocp_service:match_high:355 - INFO - OCP exact match: {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}

Erf, is there a way to identify the "media" skills?

Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.758 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.759 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['Play song radio', 0.78508979]], 'lang': 'en-us'}
Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.764 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['Play song radio', 0.78508979]], 'lang': 'en-us'}
Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.775 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.777 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f8823c110>>
Jun 26 20:18:50 mark2 ovos-core[3992]: 2024-06-26 20:18:50.786 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f88165090>>
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.220 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'song radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.222 - skills - ovos_core.intent_services.ocp_service:match_high:355 - INFO - OCP exact match: {'entities': {'query': 'song radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.283 - skills - ovos_core.intent_services.ocp_service:handle_m:799 - INFO - Session: default Available stream extractor plugins: []
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.409 - skills - ovos_core.intent_services.ocp_service:classify_media:731 - INFO - OVOSCommonPlay MediaType prediction: radio confidence: 0.496
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.411 - skills - ovos_core.intent_services.ocp_service:classify_media:732 - DEBUG -      utterance: song radio
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.422 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - ocp_high match: IntentMatch(intent_service='OCP_intents', intent_type='ocp:play', intent_data={'media_type': <MediaType.RADIO: 7>, 'query': 'song radio', 'entities': {}, 'skills': [], 'conf': 0.96, 'media_conf': 0.496, 'lang': 'en-us'}, skill_id='ovos.common_play', utterance='song radio')
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.433 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.6510732173919678
Jun 26 20:18:51 mark2 ovos-core[3992]: 2024-06-26 20:18:51.494 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
goldyfruit commented 2 months ago

With no media skill:

Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.768 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.781 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.83666778]], 'lang': 'en-us'}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.785 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.83666778]], 'lang': 'en-us'}
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.797 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.799 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f6c37be10>>
Jun 26 19:04:40 mark2 ovos-core[2593]: 2024-06-26 19:04:40.817 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f6c2b4950>>
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.276 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.277 - skills - ovos_core.intent_services.ocp_service:match_high:355 - INFO - OCP exact match: {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.396 - skills - ovos_core.intent_services.ocp_service:classify_media:731 - INFO - OVOSCommonPlay MediaType prediction: radio confidence: 0.42
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.397 - skills - ovos_core.intent_services.ocp_service:classify_media:732 - DEBUG -      utterance: soul radio
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.399 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - ocp_high match: IntentMatch(intent_service='OCP_intents', intent_type='ocp:play', intent_data={'media_type': <MediaType.RADIO: 7>, 'query': 'soul radio', 'entities': {}, 'skills': [], 'conf': 0.96, 'media_conf': 0.42, 'lang': 'en-us'}, skill_id='ovos.common_play', utterance='soul radio')
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.405 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.60793137550354
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.453 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.502 - skills - ovos_bus_client.apis.ocp:__init__:876 - DEBUG - Created RADIO query: soul radio
Jun 26 19:04:41 mark2 ovos-core[2593]: 2024-06-26 19:04:41.607 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.624 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.626 - skills - ovos_core.intent_services.ocp_service:_execute_query:941 - DEBUG - OVOSCommonPlay falling back to MediaType.GENERIC
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.669 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.687 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:948 - DEBUG - skill-ovos-news.openvoiceos is searching
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.904 - skills - ovos_bus_client.apis.ocp:handle_skill_response:982 - DEBUG - got 0 results from skill-ovos-news.openvoiceos
Jun 26 19:04:56 mark2 ovos-core[2593]: 2024-06-26 19:04:56.905 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1015 - DEBUG - skill-ovos-news.openvoiceos finished search
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.407 - skills - ovos_bus_client.apis.ocp:handle_skill_search_end:1029 - INFO - Received search responses from all skills!
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.473 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.475 - skills - ovos_core.intent_services.ocp_service:_execute_query:948 - DEBUG - Returning 0 search results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.477 - skills - ovos_core.intent_services.ocp_service:_search:898 - DEBUG - Got 0 results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.479 - skills - ovos_core.intent_services.ocp_service:filter_results:828 - DEBUG - filtered 0 low confidence results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.481 - skills - ovos_core.intent_services.ocp_service:filter_results:836 - DEBUG - filtered 0 wrong MediaType results
Jun 26 19:04:57 mark2 ovos-core[2593]: 2024-06-26 19:04:57.505 - skills - ovos_core.intent_services.ocp_service:_search:901 - DEBUG - Got 0 usable results

15 seconds is pretty long, any way to reduce this?

JarbasAl commented 2 months ago

Erf, is there a way to identify the "media" skills?

any OCP skill, if it's supposed to handle "play" queries it's a media skill

15 seconds is pretty long, any way to reduce this?

try now (but also try without news skill as that was the original fix in this PR)

goldyfruit commented 2 months ago

15 seconds is pretty long, any way to reduce this?

try now (but also try without news skill as that was the original fix in this PR)

I re-installed the news skill and still takes 15 seconds when it can't play what is required.

Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.681 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-cancel: {}
Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.682 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-corrections: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.76973373]], 'lang': 'en-us'}
Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.687 - skills - ovos_core.transformers:transform:64 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcriptions': [['play Soul Radio', 0.76973373]], 'lang': 'en-us'}
Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.701 - skills - ovos_core.intent_services:get_pipeline:251 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'ocp_medium', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'fallback_medium', 'fallback_low']
Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.704 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f90bef790>>
Jun 26 21:29:14 mark2 ovos-core[5319]: 2024-06-26 21:29:14.723 - skills - ovos_core.intent_services:handle_utterance:392 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f90b09d50>>
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.211 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.213 - skills - ovos_core.intent_services.ocp_service:match_high:366 - INFO - OCP exact match: {'entities': {'query': 'soul radio'}, 'conf': 0.96, 'name': 'play'}
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.329 - skills - ovos_core.intent_services.ocp_service:classify_media:746 - INFO - OVOSCommonPlay MediaType prediction: radio confidence: 0.42
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.330 - skills - ovos_core.intent_services.ocp_service:classify_media:747 - DEBUG -      utterance: soul radio
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.332 - skills - ovos_core.intent_services:handle_utterance:380 - INFO - ocp_high match: IntentMatch(intent_service='OCP_intents', intent_type='ocp:play', intent_data={'media_type': <MediaType.RADIO: 7>, 'query': 'soul radio', 'entities': {}, 'skills': [], 'conf': 0.96, 'media_conf': 0.42, 'lang': 'en-us'}, skill_id='ovos.common_play', utterance='soul radio')
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.339 - skills - ovos_core.intent_services:handle_utterance:398 - DEBUG - intent matching took: 0.639406681060791
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.392 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.444 - skills - ovos_bus_client.apis.ocp:__init__:876 - DEBUG - Created RADIO query: soul radio
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.495 - skills - ovos_core.intent_services.ocp_service:_execute_query:948 - INFO - No skills available to handle 7 queries, forcing MediaType.GENERIC
Jun 26 21:29:15 mark2 ovos-core[5319]: 2024-06-26 21:29:15.541 - skills - ovos_bus_client.apis.ocp:register_events:935 - DEBUG - Registering Search Bus Events
Jun 26 21:29:20 mark2 ovos-core[5319]: 2024-06-26 21:29:20.311 - skills - ovos_bus_client.util.scheduler:check_state:186 - DEBUG - Call scheduled event: skill-ovos-homescreen.openvoiceos:skill-ovos-homescreen.openvoiceosupdate_dt
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.317 - skills - ovos_bus_client.util.scheduler:check_state:186 - DEBUG - Call scheduled event: skill-ovos-homescreen.openvoiceos:skill-ovos-homescreen.openvoiceosupdate_dt
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.561 - skills - ovos_bus_client.apis.ocp:remove_events:941 - DEBUG - Removing Search Bus Events
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.563 - skills - ovos_core.intent_services.ocp_service:_execute_query:973 - DEBUG - Returning 0 search results
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.565 - skills - ovos_core.intent_services.ocp_service:_search:913 - DEBUG - Got 0 results
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.567 - skills - ovos_core.intent_services.ocp_service:filter_results:843 - DEBUG - filtered 0 low confidence results
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.569 - skills - ovos_core.intent_services.ocp_service:filter_results:851 - DEBUG - filtered 0 wrong MediaType results
Jun 26 21:29:30 mark2 ovos-core[5319]: 2024-06-26 21:29:30.587 - skills - ovos_core.intent_services.ocp_service:_search:916 - DEBUG - Got 0 usable results
JarbasAl commented 2 months ago

asking for a search before this PR could take up to 30+ seconds (media type search + generic search)

i didnt see any logs without any OCP skill yet, those should speak the new dialog and take < 1 second

asking for a media type without skills for that media type (eg, ask radio with only news installed) with this PR can take up to 15 seconds, but not the 30+ it originally could

further reducing those 15 seconds will need a PR in ovos-workshop, but that max timeout value can also be set in config

mikejgray commented 2 months ago

Tested on Mac and it works as expected, especially with the ovos-workshop PR mentioned. Once tests are passing I'm happy to approve the PR