main application with tuning, playing, and GUI

This commit is contained in:
Brandon4466
2024-01-14 23:41:53 -08:00
commit 7ee950b2c5
21 changed files with 388 additions and 0 deletions

19
_detectsong.py Normal file
View File

@@ -0,0 +1,19 @@
import sounddevice as sd
import numpy as np
import time
import asyncio
from shazamio import Shazam
def rec():
recording = sd.rec((44100 * 5), samplerate=44100, channels=1, detype=np.int16)
sd.wait()
return recording
async def detect():
recording = rec()
shazam = Shazam()
out = await shazam.recognize_song(recording)
print(out)
loop = asyncio.get_event_loop()
loop.run_until_complete(detect())