Support resampling (#77)
This commit is contained in:
@@ -92,9 +92,12 @@ def create_recognizer():
|
||||
|
||||
|
||||
def main():
|
||||
print("Started! Please speak")
|
||||
recognizer = create_recognizer()
|
||||
sample_rate = 16000
|
||||
print("Started! Please speak")
|
||||
|
||||
# The model is using 16 kHz, we use 48 kHz here to demonstrate that
|
||||
# sherpa-onnx will do resampling inside.
|
||||
sample_rate = 48000
|
||||
samples_per_read = int(0.1 * sample_rate) # 0.1 second = 100 ms
|
||||
last_result = ""
|
||||
stream = recognizer.create_stream()
|
||||
|
||||
Reference in New Issue
Block a user