mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-09 18:12:17 +00:00
Release v1.1
This commit is contained in:
parent
bac4db61c3
commit
5407b48b87
@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||
|
||||
project(kaldifeat)
|
||||
|
||||
set(kaldifeat_VERSION "1.0")
|
||||
set(kaldifeat_VERSION "1.1")
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
|
@ -32,8 +32,8 @@ def read_wave(filename) -> torch.Tensor:
|
||||
|
||||
def test_fbank():
|
||||
device = torch.device("cpu")
|
||||
if torch.cuda.is_available():
|
||||
device = torch.device("cuda", 0)
|
||||
# if torch.cuda.is_available():
|
||||
# device = torch.device("cuda", 0)
|
||||
|
||||
wave0 = read_wave("test_data/test.wav")
|
||||
wave1 = read_wave("test_data/test2.wav")
|
||||
@ -61,8 +61,8 @@ def test_fbank():
|
||||
|
||||
# To compute fbank features for only a specified frame
|
||||
audio_frames = fbank.convert_samples_to_frames(wave0)
|
||||
feature_frame_1 = fbank.compute(audio_frames[1])
|
||||
feature_frame_10 = fbank.compute(audio_frames[10])
|
||||
feature_frame_1 = fbank.compute(audio_frames[1:2])
|
||||
feature_frame_10 = fbank.compute(audio_frames[10:11])
|
||||
|
||||
assert torch.allclose(features0[1], feature_frame_1)
|
||||
assert torch.allclose(features0[10], feature_frame_10)
|
||||
|
Loading…
x
Reference in New Issue
Block a user