tomer9080 commited on
Commit
d5ca3be
·
1 Parent(s): 92ba3a7

rm pyaudio

Browse files
Files changed (2) hide show
  1. requirements.txt +0 -1
  2. whisper_stream/audio.py +3 -4
requirements.txt CHANGED
@@ -6,7 +6,6 @@ numpy==1.26.0
6
  openai_whisper==20240930
7
  pandas==2.3.1
8
  praatio==6.2.0
9
- pyaudio==0.2.11
10
  pytorch_lightning==2.5.0.post0
11
  regex==2024.11.6
12
  soundfile==0.12.1
 
6
  openai_whisper==20240930
7
  pandas==2.3.1
8
  praatio==6.2.0
 
9
  pytorch_lightning==2.5.0.post0
10
  regex==2024.11.6
11
  soundfile==0.12.1
whisper_stream/audio.py CHANGED
@@ -6,7 +6,6 @@ from typing import Optional, Union
6
 
7
  import wave
8
  import torch
9
- import pyaudio
10
  import numpy as np
11
  import soundfile as sf
12
  import torch.nn.functional as F
@@ -32,7 +31,7 @@ class MyStream:
32
  sample_rate: int = 16000,
33
  channels: int = 2,
34
  filename: str = None,
35
- inp_dtype: any = pyaudio.paInt16,
36
  simulate_stream: bool = False,
37
  wav_file: str = None,
38
  relay: bool = False,
@@ -79,8 +78,8 @@ class MyStream:
79
  def open_stream(self):
80
  if self.simulate_stream or self.relay or self.use_remote_machine: return
81
 
82
- self.audio = pyaudio.PyAudio()
83
- self.stream = self.audio.open(input=True, format=self.inp_dtype, channels=self.channels, rate=self.sample_rate, frames_per_buffer=self.chunk_size)
84
 
85
  def _read_from_stream(self):
86
  print("Streaming instance recording started...")
 
6
 
7
  import wave
8
  import torch
 
9
  import numpy as np
10
  import soundfile as sf
11
  import torch.nn.functional as F
 
31
  sample_rate: int = 16000,
32
  channels: int = 2,
33
  filename: str = None,
34
+ inp_dtype: any = torch.int16,
35
  simulate_stream: bool = False,
36
  wav_file: str = None,
37
  relay: bool = False,
 
78
  def open_stream(self):
79
  if self.simulate_stream or self.relay or self.use_remote_machine: return
80
 
81
+ # self.audio = pyaudio.PyAudio()
82
+ # self.stream = self.audio.open(input=True, format=self.inp_dtype, channels=self.channels, rate=self.sample_rate, frames_per_buffer=self.chunk_size)
83
 
84
  def _read_from_stream(self):
85
  print("Streaming instance recording started...")