Share your repls and programming experiences

← Back to all posts
Artificially Intelligent Audio Player
BLyons (11)

Simple , fast, highly intelligent and remarkably accurate. Any sound, song, theme, band, or artist. Mobile, BlueTooth and Gracenote capable for passenger mobile play, pause or amplification. This feature will work with proper browser configuration. This is the DESKTOP DEMO version.

ar·ti·fi·cial in·tel·li·gence
/ˌärdəˈfiSHəl inˈteləjəns/
noun
the theory and development of computer systems able to perform tasks that normally require human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.

For use on Mobile or In Vehicle:

  1. Open link https://audiop--blyons.repl.co/ (Chrome)
  2. Click 3 dots in top right corner ( Chrome)
  3. Put a check in the Desktop site box (Chrome)
  4. Enter search in text box (Sound, Song, Band or Artist)
  5. Hit Play button (use headphone button to pause, Stop button to end)
  6. You now can use in your car* (Bluetooth enabled)
  7. Pause with car audio Pause button.
  8. Zoom the screen to your comfort

As a passenger ONLY!*

AI | Audio Player was coded in Python 3, Flask, CSS and HTML and uses a free Javascript counter. All coded on @repl.it by "B" at https://www.pcondemand.com

Commentshotnewtop
Scoder12 (349)

How is this AI? A quick examination of the code just shows it return the first result found on youtube for the given data. There is nothing AI about this, its just a youtube player. smh

Scoder12 (349)

@BLyons then why do you just use

search_results[0]

on line 25? Is that not the first result?

Scoder12 (349)

@BLyons its still not an AI. The only reason it is different is because youtube search results aren't always the same. I made a demo so you can see the video urls its returning https://repl.it/@Scoder12/FrankAdolescentSoftwaresuite

BLyons (11)

@Scoder12 Good for you, contest still open

Scoder12 (349)

@BLyons
href= matches the characters href= literally (case sensitive)
\" matches the character " literally (case sensitive)
\/ matches the character / literally (case sensitive)
watch matches the characters watch literally (case sensitive)
\? matches the character ? literally (case sensitive)
v= matches the characters v= literally (case sensitive)
1st Capturing Group (.{11})
.{11} matches any character (except for line terminators)
{11} Quantifier — Matches exactly 11 times

...so it just grabs all the video urls it can find and gets the first one. Therefore, "the first search result". Youtube search results aren't constant, so your "tests" don't prove anything.

CSharpIsGud (46)

@BLyons Going to have to agree with @Scoder12 I can clearly see that it just searches youtube, gathers the id of all the videos and takes the first result, nothing says youtube has to give you the same videos in the same order every time, just like I can use a random number generator.
While the dictionary definition of AI might technically apply, it is by no means a "complex" algorithm

BLyons (11)

@Scoder12 Are you hiring? Because if you are, I could come work for you for free and learn so much. Still waiting to see your contest entry.

BLyons (11)

@CSharpIsGud Are you hiring? Because if you are, I could come work for you for free and learn so much. Still waiting to see your contest entry.

CSharpIsGud (46)

@BLyons I get mobile notifications, no you were not writing code before we were "pulling poop out of our diapers", I read top to bottom and I know what indexing the first entry in an array looks like.. AI is not the same as taking the first result from a dynamic website, I urge you to read a course on machine learning/python as well (and please do try to explain it in the most complex way you think you possibly can and avoid replying with something hypocritical)

search_results = re.findall(r'href=\"\/watch\?v=(.{11})', html_content.read().decode()) <- finds all the videos on the youtube search page
url=("https://www.youtube.com/embed/" + search_results[0]+"?autoplay=1") <- TAKES THE FIRST RESULT WHICH OBVIOUSLY CAN BE DIFFERENT EVERY TIME

Also love how you removed the salty responses.
But I will leave you to your self-centered delusions

CSharpIsGud (46)

@BLyons Note "first result from our list", that is literally what we both have been saying, I can put something in your "complex algorithm" and then search the same thing through youtube, guess what I get as the first result. But the problem here is not you taking the top youtube result, it is you calling it "complex" and all that which it isn't

CSharpIsGud (46)

@BLyons ikr, you get so butthurt when people call you out on making simple things and calling it complex

AdrianHall (60)

This is very nice, functional and refreshingly simple. Better than youtube search in many respects! Good job!

Type in "flex tape" for an easy understanding of how this works. It doesn't just find music!

BLyons (11)

@AdrianHall Thanks for realizing it't potential...my favorite so far is "Dolby THX sound" with my headphones on.

AdrianHall (60)

@BLyons Haha, that's pretty great too!

northgand (0)

Bluetooth now enabled lol