mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
server: update to set 256 points by default
This commit is contained in:
@@ -4,7 +4,7 @@ import av
|
||||
import numpy as np
|
||||
|
||||
|
||||
def get_audio_waveform(path: Path | str, segments_count: int = 1000) -> list[int]:
|
||||
def get_audio_waveform(path: Path | str, segments_count: int = 256) -> list[int]:
|
||||
if isinstance(path, Path):
|
||||
path = path.as_posix()
|
||||
|
||||
@@ -67,7 +67,7 @@ if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("path", type=Path)
|
||||
parser.add_argument("--segments-count", type=int, default=1000)
|
||||
parser.add_argument("--segments-count", type=int, default=256)
|
||||
args = parser.parse_args()
|
||||
|
||||
print(get_audio_waveform(args.path, args.segments_count))
|
||||
|
||||
@@ -121,7 +121,7 @@ class Transcript(BaseModel):
|
||||
# move temporary file to final location
|
||||
shutil.move(tmp.name, fn.as_posix())
|
||||
|
||||
def convert_audio_to_waveform(self, segments_count=1000):
|
||||
def convert_audio_to_waveform(self, segments_count=256):
|
||||
fn = self.audio_waveform_filename
|
||||
if fn.exists():
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user