changed type of sr
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
from subprocess import CalledProcessError, run
|
from subprocess import CalledProcessError, run
|
||||||
|
from typing import Union
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
||||||
class AudioProcessor:
|
class AudioProcessor:
|
||||||
@@ -9,7 +9,7 @@ class AudioProcessor:
|
|||||||
Audio Processor using PyTorchaudio instead of PyDub
|
Audio Processor using PyTorchaudio instead of PyDub
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, waveform: torch.Tensor, sr : torch.Tensor,
|
def __init__(self, waveform: torch.Tensor, sr : int = SAMPLE_RATE,
|
||||||
*args, **kwargs) -> None:
|
*args, **kwargs) -> None:
|
||||||
"""
|
"""
|
||||||
Initialise audio processor
|
Initialise audio processor
|
||||||
|
|||||||
Reference in New Issue
Block a user