(self)
| 121 | return curr_model_audio.float().cpu().numpy() |
| 122 | |
| 123 | def cleanup(self): |
| 124 | print_colored("Cleaning up audio processor...", "blue") |
| 125 | os.makedirs('audio_recordings', exist_ok=True) |
| 126 | torchaudio.save(f'audio_recordings/{time.strftime("%d-%H-%M")}.wav', self.recorded_audio.cpu(), SAMPLE_RATE) |
| 127 | self.model.deinit_cache() |
| 128 | self.initialize_state(self.prompt_path) |
| 129 | print_colored("Audio processor cleanup complete", "green") |
| 130 | |
| 131 | @app.post("/set_temperature") |
| 132 | async def set_temperature(token_temp: Optional[float] = None, categorical_temp: Optional[float] = None, gaussian_temp: Optional[float] = None): |
no test coverage detected