fully functional runtime stuff. Need settings then new features

This commit is contained in:
michalcourson
2026-02-21 20:42:11 -05:00
parent c1948182ec
commit a761b81dd1
8 changed files with 155 additions and 21 deletions

View File

@ -18,16 +18,16 @@
"filename": "C:\\Users\\mickl\\Desktop\\cliptrim-ui\\ClipTrimApp\\audio-service\\recordings\\audio_capture_20260220_193822.wav",
"name": "Pee pee poo poo",
"playbackType": "playStop",
"startTime": 27.756510985786615,
"volume": 1
"startTime": 27.587412587412587,
"volume": 0.69
},
{
"endTime": 28.597210828548004,
"endTime": 27.516843118383072,
"filename": "C:\\Users\\mickl\\Desktop\\cliptrim-ui\\ClipTrimApp\\audio-service\\recordings\\audio_capture_20260220_200442.wav",
"name": "Clip 20260220_200442",
"playbackType": "playStop",
"startTime": 26.1853978671042,
"volume": 1
"playbackType": "playOverlap",
"startTime": 25.120307988450435,
"volume": 0.41
}
]
}

View File

@ -28,9 +28,9 @@ class AudioRecorder:
self.channels = 2
self.buffer = np.zeros((int(self.duration * self.sample_rate), self.channels), dtype=np.float32)
self.recordings_dir = "recordings"
self.stream = sd.InputStream(
samplerate=self.sample_rate,
channels=self.channels,
callback=self.record_callback
)
@ -43,10 +43,9 @@ class AudioRecorder:
self.stream.stop()
self.buffer = np.zeros((int(self.duration * self.sample_rate), self.channels), dtype=np.float32)
print(f"AudioRecorder initialized with duration={self.duration}s, sample_rate={self.sample_rate}Hz, channels={self.channels}")
self.stream = sd.InputStream(
samplerate=self.sample_rate,
channels=self.channels,
callback=self.record_callback
)