Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-music-system / tools/resample_to_32k.py |
| Date | Not specified in source |
| Repository | Janady13/ai-music-system |
| Revision | 9a816470ef81edba7a5d8f3aae62c05eead638a7 |
| Branch | main |
| Path or archive member | tools/resample_to_32k.py |
| Original SHA-256 | 705ea7a7472d1628ce515e05fb4684918b53a556a580981b01dbb2a595e7ea61 |
| Git blob SHA | 415fe8665fcbfb7c1226879e91c2a9d3c09257a7 |
| Reading-copy SHA-256 | 705ea7a7472d1628ce515e05fb4684918b53a556a580981b01dbb2a595e7ea61 |
Every recorded occurrence
These 3 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/ai-music-system / tools/resample_to_32k.py | main | 9a816470ef81edba7a5d8f3aae62c05eead638a7 | Open original |
| Janady13/ai-music-system / tools/resample_to_32k.py | codex/create-ai-for-music-generation-ifwcfc | cd5207850253ee238f8a267c043b1e3c070ed81a | Open original |
| Janady13/ai-music-system / tools/resample_to_32k.py | codex/create-ai-for-music-generation | 017052c0e72c6175378aebb7a7f9dd96e82c3ce2 | Open original |
Recovered source transcript
Download complete source text ↓14 lines · 0.5 KB
import os, sys, soundfile as sf, librosa, glob
src = sys.argv[1]; dst = sys.argv[2]
os.makedirs(dst, exist_ok=True)
for f in glob.glob(os.path.join(src, "**", "*.*"), recursive=True):
if os.path.isdir(f):
continue
try:
y, sr = librosa.load(f, sr=32000, mono=True)
out = os.path.join(dst, os.path.splitext(os.path.basename(f))[0] + ".wav")
sf.write(out, y, 32000)
print(out)
except Exception as e:
print("skip", f, e)