Tuesday, August 11, 2026

Recognise artist , title and song from an unknown song or sound clip you collected from somewhere else,using python and audd api,cost is less than 5 dollar

 


import os

import requests


AUDD_URL = "https://api.audd.io/"



def recognize_track(mp3_file, api_token):


    # Check whether the file exists

    if not os.path.isfile(mp3_file):

        print("ERROR: File not found")

        return


    # Check file size

    file_size = os.path.getsize(mp3_file)


    if file_size > 10 * 1024 * 1024:

        print("ERROR: File is larger than 10 MB")

        return


    print("Recognising:", mp3_file)


    try:

        with open(mp3_file, "rb") as audio_file:


            files = {

                "file": audio_file

            }


            data = {

                "api_token": api_token

            }


            response = requests.post(

                AUDD_URL,

                files=files,

                data=data,

                timeout=60

            )


    except requests.exceptions.RequestException as e:

        print("Network error:")

        print(e)

        return


    except Exception as e:

        print("Error:")

        print(e)

        return


    # Get JSON response

    try:

        result = response.json()


    except ValueError:

        print("ERROR: AudD returned an invalid response")

        print(response.text)

        return


    # Display API error

    if result.get("status") == "error":


        error = result.get("error", {})


        print("AUDD API ERROR")

        print("Error code:", error.get("error_code"))

        print("Error message:", error.get("error_message"))


        return


    # Get recognition result

    track = result.get("result")


    # No match

    if track is None:

        print("No match")

        return


    # Track recognised

    artist = track.get("artist", "Unknown artist")

    title = track.get("title", "Unknown title")


    print()

    print("MATCH FOUND")

    print("Artist:", artist)

    print("Title :", title)


    album = track.get("album")


    if album:

        print("Album :", album)



# ------------------------------------

# CHANGE THESE TWO VALUES

# ------------------------------------


MP3_FILE = r"song.mp3"


API_TOKEN = "***"



# ------------------------------------

# Run recognition

# ------------------------------------


recognize_track(MP3_FILE, API_TOKEN)


Output:


Recognising: song.mp3


MATCH FOUND

Artist: Wali Bird

Title : Perfection (Interlude)

Album : B.I.R.D


Monday, August 3, 2026

Fix Touchpad Tap to Click Not Working in Linux Mint

If you are not new to Linux Mint, just follow this path: System Settings ⇾ Hardware ⇾ Mouse and Touchpad ⇾ Touchpad tab ⇾ Enable "Tap to Click".

Source : https://itsfoss.com/fix-touchpad-click-linux-mint/

solve bluetooth issue with broadcam wireless adapter BCM43142 in garuda linux

To solve bluetooth issue

To get the Broadcom BCM43142 Bluetooth working on Arch Linux, install the missing proprietary firmware package from the AUR (like broadcom-bt-firmware),

 enable the bluez service, and reload the kernel module.

Firmware and Driver Setup

Most users on Unix StackExchange agree that the BCM43142 requires extra firmware not present in standard packages.

Install an AUR helper or manually build the package: yay -S broadcom-bt-firmware (or bcm43142a0-firmware).

Restart or reload the btusb kernel module using sudo modprobe -r btusb 

followed by sudo modprobe btusb.

Enabling Bluetooth Service

Install the core Bluetooth software:

 sudo pacman -S bluez bluez-utils.

Start and turn on the system daemon: 

sudo systemctl enable --now bluetooth.service.

Use bluetoothctl to power on the controller and scan for your peripheral devices.

If agent registered messege appeared it is working

install broadcam wireless bluetooth adapter BCM43142 on garuda linux

এমন একটা দিন ছিল যে লিনাক্স অপারেটিং সিস্টেমের কোর্স করছি কিন্তু বাড়িতে ইনস্টল করতে পারি না

যদিও বা করি ড্রাইভার পাওয়া যেত না বিভিন্ন ডিভাইসের ,ইন্টারনেটের যুগে বড় হয়েছি ,নেট কানেকশন না করা গেলে কিসের অপারেটিং সিস্টেম

কোন যুগের কথা ,দুই হাজার চার ,দুই হাজার পাঁচ

তারপর দুই দশক চলে গেল

লিনাক্স এখন অনেক উন্নত ,বেশিরভাগ কম্পিউটারে সব ডিভাইস চিনে ফেলে

কিন্তু বেশিরভাগ ,এখনও সব নয়

একটা পুরোনো ল্যাপটপ কিনেছিলাম ,এইচপি প্যাভিলিয়ন

তার ওয়ারলেস এডাপ্টার ছিল 

সেটা এই কমান্ডে দেখা যায়

Lspci -nn | grep -i net

দেখতে পেলাম BCM43142

অর্থাৎ ব্রডক্যাম এডাপ্টার ,এগুলো সহজে চিনতে পারে না 

ফলে আলাদা করে মডিউল ইনস্টল করতে হলো

Wl বলে একটা মডিউল আছে

Sudo pacman -S linux-zen-headers

Sudo pacman -S broadcam-wl-dkms

Sudo dkms autoinstall

Sudo modprobe wl

না হলে একটা রিস্টার্ট করতে হবে

এখন নেট না পেলে এগুলো করছিলাম কী করে ,স্বাভাবিক প্রশ্ন

ফোন লাগিয়ে ইউএসবি টেদারিং করে 

এবার এতটা পরিশ্রম এক মুহূর্তে হয়নি ,বেশ খানিকক্ষণ চেষ্টা করে তবে সফল হয়েছি ,ফোন আর লাগিয়ে নেট পেতে হচ্ছে না ,wifi কাজ করছে

কিন্তু আর্চ লিনাক্সের একটা এক্সাম্পল এন্ডাভার লিনাক্স ইউজ করলে এইটুকুও করতে হত না

লাইভ বুট করে ও ব্রডক্যাম খুঁজে নিয়ে স্বতঃস্ফূর্ত ভাবে ড্রাইভার নামিয়ে নেয় 

অনেকদিনের একটা সমস্যা মিটলো 

এবার নেক্সট টার্গেট ব্লুটুথ

দেখা যাক