OpenVoiceOS / ovos-media

Apache License 2.0
1 stars 3 forks source link

No luck with ovos-media and OCP plugin #21

Closed goldyfruit closed 5 months ago

goldyfruit commented 6 months ago

I'm trying to use ovos-media but so far I was not able to make it works with OCP plugin.

I tried, "play bobby brown" but ovos-core returns this log:

Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.167 - skills - ovos_core.transformers:transform:61 - DEBUG - ovos-utterance-cancel: {}
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.169 - skills - ovos_core.transformers:transform:64 - WARNING - ovos-utterance-corrections transform exception: list index out of range
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.177 - skills - ovos_core.transformers:transform:61 - DEBUG - ovos-utterance-normalizer: {'client_name': 'ovos_dinkum_listener', 'source': 'audio', 'destination': ['skills'], 'transcription': 'play Bobby Brown', 'lang': 'en-us'}
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.183 - skills - ovos_core.intent_services:get_pipeline:260 - DEBUG - Session pipeline: ['stop_high', 'converse', 'ocp_high', 'padatious_high', 'adapt_high', 'fallback_high', 'stop_medium', 'adapt_medium', 'padatious_medium', 'adapt_low', 'common_qa', 'ocp_medium', 'fallback_medium', 'ocp_fallback', 'fallback_low']
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.184 - skills - ovos_core.intent_services:handle_utterance:375 - DEBUG - no match from <bound method StopService.match_stop_high of <ovos_core.intent_services.stop_service.StopService object at 0x7f62451810>>
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.191 - skills - ovos_core.intent_services:handle_utterance:375 - DEBUG - no match from <bound method ConverseService.converse_with_skills of <ovos_core.intent_services.converse_service.ConverseService object at 0x7f63602110>>
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.613 - skills - padacioso:calc_intent:255 - DEBUG - {'entities': {'query': 'bobby brown'}, 'conf': 0.96, 'name': 'play'}
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.615 - skills - ovos_core.intent_services.ocp_service:match_high:316 - INFO - OCP exact match: {'entities': {'query': 'bobby brown'}, 'conf': 0.96, 'name': 'play'}
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.766 - skills - ovos_core.intent_services.ocp_service:classify_media:638 - INFO - OVOSCommonPlay MediaType prediction: movie confidence: 0.327
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.768 - skills - ovos_core.intent_services.ocp_service:classify_media:639 - DEBUG -      utterance: bobby brown
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.769 - skills - ovos_core.intent_services.ocp_service:classify_media:641 - INFO - ignoring MediaType classifier, low confidence prediction
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.779 - skills - ovos_core.intent_services:handle_utterance:381 - DEBUG - intent matching took: 0.5961189270019531
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.810 - skills - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.819 - skills - ovos_bus_client.apis.ocp:__init__:855 - DEBUG - Created GENERIC query: bobby brown
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.880 - skills - ovos_bus_client.apis.ocp:register_events:901 - DEBUG - Registering Search Bus Events
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.905 - skills - skill_ovos_youtube_music:search_db:253 - DEBUG - searching YoutubeMusic artist cache
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.911 - skills - ovos_bus_client.apis.ocp:handle_skill_search_start:914 - DEBUG - skill-ovos-youtube-music.openvoiceos is searching
Mar 30 12:38:56 neon ovos-core[917]: 2024-03-30 12:38:56.930 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 14 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.543 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.602 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.828 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.892 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.903 - skills - ovos_bus_client.apis.ocp:handle_skill_response:965 - INFO - Receiving very high confidence match, stopping search early
Mar 30 12:38:57 neon ovos-core[917]: 2024-03-30 12:38:57.915 - skills - ovos_bus_client.apis.ocp:handle_skill_response:973 - DEBUG -   - grace period: 0.5 seconds
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.418 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.420 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.422 - skills - ovos_bus_client.apis.ocp:handle_skill_response:948 - DEBUG - got 1 results from skill-ovos-youtube-music.openvoiceos
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.491 - skills - ovos_bus_client.apis.ocp:remove_events:907 - DEBUG - Removing Search Bus Events
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.493 - skills - ovos_core.intent_services.ocp_service:_execute_query:782 - DEBUG - Returning 8 search results
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.494 - skills - ovos_core.intent_services.ocp_service:_search:755 - DEBUG - Got 21 results
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.548 - skills - ovos_core.intent_services.ocp_service:filter_results:694 - DEBUG - filtered 2 low confidence results
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.552 - skills - ovos_core.intent_services.ocp_service:filter_results:715 - DEBUG - filtered 19 results that require unavailable plugins: {'youtube'}
Mar 30 12:38:58 neon ovos-core[917]: 2024-03-30 12:38:58.629 - skills - ovos_core.intent_services.ocp_service:_search:757 - DEBUG - Got 0 usable results

Here are the ovos-audio logs:

Mar 30 12:41:45 neon ovos-audio[916]: 2024-03-30 12:41:45.400 - audio - ovos_audio.service:handle_speak:266 - DEBUG - ignoring speak from non-native source, playback handled directly by client
Mar 30 12:41:45 neon ovos-audio[916]: 2024-03-30 12:41:45.524 - audio - ovos_bus_client.client.client:on_default_session_update:161 - DEBUG - synced default_session
Mar 30 12:41:46 neon ovos-audio[916]: 2024-03-30 12:41:46.257 - audio - ovos_audio.service:execute_tts:344 - INFO - Speak: Sorry, I don't know how to play bobby brown
Mar 30 12:41:46 neon ovos-audio[916]: 2024-03-30 12:41:46.418 - audio - ovos_bus_client.session:get:585 - DEBUG - No message, use default session

Here is my configuration:

  "media": {
    "preferred_audio_services": [
      "vlc"
    ],
    "preferred_web_services": [
      "browser"
    ],
    "preferred_video_services": [
      "vlc"
    ],
    "disable_mpris": true,
    "manage_external_players": true,
    "audio_players": {
      "vlc": {
        "module": "ovos-media-audio-plugin-vlc",
        "aliases": [
          "VLC"
        ],
        "active": true
      }
    }
  },
  "enable_old_audioservice": false,
  "intents": {
    "pipeline": [
      "stop_high",
      "converse",
      "ocp_high",
      "padatious_high",
      "adapt_high",
      "fallback_high",
      "stop_medium",
      "adapt_medium",
      "padatious_medium",
      "adapt_low",
      "common_qa",
      "ocp_medium",
      "fallback_medium",
      "ocp_fallback",
      "fallback_low"
    ]
  }

Here are the Python packages installed:

pip install git+https://github.com/OpenVoiceOS/ovos-media.git
pip install git+https://github.com/OpenVoiceOS/ovos-media-plugin-vlc.git
pip install git+https://github.com/OpenVoiceOS/ovos-ocp-youtube-plugin.git
pip install git+https://github.com/OpenVoiceOS/skill-ovos-youtube-music.git
goldyfruit commented 6 months ago

The interesting line I guess will be this one:

filtered 19 results that require unavailable plugins: {'youtube'}

https://github.com/OpenVoiceOS/ovos-core/blob/dev/ovos_core/intent_services/ocp_service.py#L707-L716 https://github.com/OpenVoiceOS/ovos-media/blob/41dedd1f351f923ff8f4247ed3d86322251fd69e/ovos_media/player.py#L645-L660

goldyfruit commented 5 months ago

ovos-media is a service and needs to be started... xD

timonvanhasselt commented 5 months ago

I was/am running into the same problem about x results that require require unavailable plugins: {'YouTube'}. Curious: How do you start ovos-media as a service? I've tried to run service.py manually, but that makes no difference in my case.

goldyfruit commented 5 months ago

I was/am running into the same problem about x results that require require unavailable plugins: {'YouTube'}. Curious: How do you start ovos-media as a service? I've tried to run service.py manually, but that makes no difference in my case.

[Unit]
Documentation=https://openvoiceos.github.io/ovos-docker/about/glossary/components/#ovos-media
Description=Open Voice OS - Media service
PartOf=ovos.service
Requires=ovos.service

[Service]
WorkingDirectory=%h/.venvs/ovos
ExecStart=%h/.venvs/ovos/bin/ovos-media
ExecReload=/usr/bin/kill -s HUP $MAINPID
ExecStop=/usr/bin/kill -s KILL $MAINPID
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=ovos.service
timonvanhasselt commented 5 months ago

Is it possible for you to add it to the Docker compose file also?

goldyfruit commented 5 months ago

Is it possible for you to add it to the Docker compose file also?

Not until ovos-media is working https://github.com/OpenVoiceOS/ovos-docker/issues/53

timonvanhasselt commented 5 months ago

ah I see, thanks.