mirror of
https://github.com/SevaSk/ecoute.git
synced 2025-01-31 16:35:22 +00:00
delete unused prints and imports
This commit is contained in:
parent
2a5efca9d6
commit
8cb45bc023
@ -1,5 +1,4 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import soundcard as sc
|
|
||||||
import whisper
|
import whisper
|
||||||
import torch
|
import torch
|
||||||
import wave
|
import wave
|
||||||
@ -18,7 +17,6 @@ class AudioTranscriber:
|
|||||||
audio_data = (audio_data * (2**15 - 1)).astype(np.int16)
|
audio_data = (audio_data * (2**15 - 1)).astype(np.int16)
|
||||||
wav_file.writeframes(audio_data.tobytes())
|
wav_file.writeframes(audio_data.tobytes())
|
||||||
result = self.audio_model.transcribe(f'temp_{id(self)}.wav', fp16=torch.cuda.is_available())
|
result = self.audio_model.transcribe(f'temp_{id(self)}.wav', fp16=torch.cuda.is_available())
|
||||||
print(torch.cuda.is_available())
|
|
||||||
text = result['text'].strip()
|
text = result['text'].strip()
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import openai
|
import openai
|
||||||
from keys import OPENAI_API_KEY
|
from keys import OPENAI_API_KEY
|
||||||
from prompts import create_prompt, INITIAL_RESPONSE
|
from prompts import create_prompt, INITIAL_RESPONSE
|
||||||
import time
|
|
||||||
|
|
||||||
openai.api_key = OPENAI_API_KEY
|
openai.api_key = OPENAI_API_KEY
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user