This media is not supported in your browser
VIEW IN TELEGRAM
I think character is obsessed with my mouse
Podcasts app on iphone is so beautiful
So me and @marshy_melon wanted to import a telegram chat's entire music library on to spotify (around 1386 songs)
Here are the steps that we followed
1. We exported the chat history on JSON format from the group (you can do that on the desktop version of telegram)
2. Marshy used python to parse the json, Looped thru the messages looked for media type audio and written it with the duration to a file. He also made sure to exclude reaction and other short audio clips
Here is the code
3. I took the output CSV and fed it to ChatGPT. I had it put the song names under a column under TITLE and the artist names under ARTIST on the next column. Also, made sure it cleaned up random numbers on artist and song noscripts since it probably knew song names if they were on Spotify
Here is the prompt
4. For the next (and last) step I fed our ChatGPT output CSV file to this open source tool I found on Spotify Community. After it was done converting, it also gives you an experimental feature called "clean up" and when it cleans up,
- the parenthesis portion is removed
- the ampersand (&) portion is removed
- single quotes (') are removed
- the "featuring" portion is removed
Which increases the yield rate slightly.
After that, we ended up with ~55% of the songs shared on the group. That is including all reaction sounds, Non Spotify songs, and bottom line failed conversions.
Here are the steps that we followed
1. We exported the chat history on JSON format from the group (you can do that on the desktop version of telegram)
2. Marshy used python to parse the json, Looped thru the messages looked for media type audio and written it with the duration to a file. He also made sure to exclude reaction and other short audio clips
Here is the code
import json
with open('result.json', 'r', encoding='utf-8') as file:
data = json.load(file)
c = data["messages"]
with open('output.csv', 'w', encoding='utf-8') as output_file:
output_file.write("noscript,duration in seconds\n")
for k in c:
if k.get('media_type') == "audio_file" and 'file_name' in k and 'duration_seconds' in k:
output_file.write(f"{k['file_name']},{k['duration_seconds']}\n")
3. I took the output CSV and fed it to ChatGPT. I had it put the song names under a column under TITLE and the artist names under ARTIST on the next column. Also, made sure it cleaned up random numbers on artist and song noscripts since it probably knew song names if they were on Spotify
Here is the prompt
Create a new csv file with first column containing TITLE with all the song noscripts separated alone below it and second column containing ARTIST with all the artist names of the songs listed below it. then you will have a problem where there is numbers before artist and song names. they are famous artists so you should be able to recognize them. clean up the numbers that come before names
Example: "04 young thug" should just be "young thug"
4. For the next (and last) step I fed our ChatGPT output CSV file to this open source tool I found on Spotify Community. After it was done converting, it also gives you an experimental feature called "clean up" and when it cleans up,
- the parenthesis portion is removed
- the ampersand (&) portion is removed
- single quotes (') are removed
- the "featuring" portion is removed
Which increases the yield rate slightly.
After that, we ended up with ~55% of the songs shared on the group. That is including all reaction sounds, Non Spotify songs, and bottom line failed conversions.
⚡2❤1
Forwarded from Designer News / Dribbble / Behance
Unpopular opinion
Linkedin is actually the most human social media
Linkedin is actually the most human social media
😁1