Submission Number: 110
Submission ID: 104
Submission UUID: 19c3be75-c369-457c-a63c-60fe55b8390a
Submission URI: /Script

Created: Thu, 03/09/2023 - 08:34
Completed: Thu, 03/09/2023 - 08:34
Changed: Thu, 03/09/2023 - 08:34

Remote IP address: 146.70.117.227
Submitted by: Anonymous
Language: English

Is draft: No
Webform: Script
Submitted to: Script Upload

Script

YouTube Music Player
Description: This skill allows users to search for and play music from YouTube while complying with copyright laws. The skill will only play music that is licensed for use or falls under fair use guidelines.

Activation Phrase: "Hey Neon, play music from YouTube."

Sample Utterances:

"Play [song name] by [artist name]."
"Find [song name] on YouTube."
"Play the top songs from [artist name] on YouTube."

Skill Steps:

Neon AI will prompt the user for the name of the song and/or artist they want to listen to.
The skill will use the YouTube API to search for the requested music.
If the requested music is licensed for use or falls under fair use guidelines, Neon AI will play the music for the user.
If the requested music is not licensed for use or does not fall under fair use guidelines, Neon AI will inform the user that the requested music cannot be played due to copyright restrictions.
The user can then request a different song or artist to listen to, or end the session.

Legal Disclaimer:

The YouTube Music Player skill is intended for personal, non-commercial use only. The user is responsible for ensuring that any music played through this skill is licensed for use or falls under fair use guidelines. Neon AI is not responsible for any copyright infringement that may result from the use of this skill. By using this skill, the user agrees to comply with all applicable copyright laws and regulations.
import neon
from neon_util import get_youtube_video

app = neon.Application()

@app.handle(intent='play_music')
def play_music_handler(request, responder):
song_name = request.slot_value('song_name')
artist_name = request.slot_value('artist_name')

# Use YouTube API to search for the requested music
video_id = get_youtube_video(song_name, artist_name)

if video_id is not None:
# Play the music if it is licensed for use or falls under fair use guidelines
responder.play_media('https://www.youtube.com/watch?v=' + video_id)
else:
# Inform the user that the requested music cannot be played due to copyright restrictions
responder.reply('Sorry, the requested music cannot be played due to copyright restrictions.')

app.run()

Author

Adam Obradovic
{Empty}
{Empty}