1
0
forked from cgvr/DeltaVR

professor says good job after first config done

This commit is contained in:
2026-03-16 14:59:10 +02:00
parent 3edef118af
commit c78886e492
24 changed files with 1305 additions and 19 deletions

View File

@@ -7,7 +7,6 @@
* npc character:
* klaas on näha temast eespool
* shape detection:
* professor võiks öelda "good job, continue..." pärast esimest successi
* kui kõik configurationid tehtud, siis professor tuleb uksest välja ja ütleb "thank you"
* peab mängijale kuidagi selgitama, kuidas scale'ida prinditud objekte
* prinditud objekti scale'imisele min ja max size limiit

View File

@@ -6,9 +6,17 @@ import numpy as np
FRAME_DURATION = 0.02 # 20 ms windows
GAIN = 1.0 # multiply RMS values (set to e.g. 30.0 if you want larger values)
EXTENSION = ".txt" # output file extension
OVERWRITE = False # set True to regenerate even if .txt exists
def process_wav(filepath):
# Compute output path first (so we can decide whether to skip)
out_path = os.path.splitext(filepath)[0] + EXTENSION
if not OVERWRITE and os.path.exists(out_path):
print(f"Skipping (already exists): {out_path}")
return
print(f"Processing: {filepath}")
# Load audio
@@ -29,7 +37,6 @@ def process_wav(filepath):
rms = rms * GAIN
# Save to .txt
out_path = os.path.splitext(filepath)[0] + EXTENSION
np.savetxt(out_path, rms, fmt="%.8f")
print(f"Saved RMS → {out_path}")
@@ -49,4 +56,4 @@ def process_folder(folder_path):
# === Run script ===
if __name__ == "__main__":
folder = input("Enter folder path: ").strip()
process_folder(folder)
process_folder(folder)