torchaudio 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c21f515fb744d7de39c8abbb3ce6ae0bd9681fecb56c2e1b52163aebf47617f
4
- data.tar.gz: 969191c9df1f01a9a3ee14b21ce6ddc74f476530da3da642eac3d880fc09b166
3
+ metadata.gz: 938d840ca33f543f9ae76e911fe9681448703dddaab35a1a9dc05703a19d42c0
4
+ data.tar.gz: 5bac1684448eac1c520d2f4e5f17ac0ac7948afc7a2e46bb4bc5cd721a66ef26
5
5
  SHA512:
6
- metadata.gz: c6a27dcc0d9a07b5323a2906534752b06b34dfbe8444a46a1b2aeb2d4182ca8ffc3192cba23f1ab954359366368d5c9959035c30a7e4838b76d1bb8fce8e8e6c
7
- data.tar.gz: 647c88bbd2d3b4556a678ac1c8a00eadb3a332d45108902cd7f09d17d721416f1ac04abd2d57f8dfa71482b1258ec1453e5fcdacb13d58fcf1a37bd5c3461cce
6
+ metadata.gz: 01f602344f23934a80470c72a2608f64209fd3649c614d107f6a87757774a6930a14e83fc421cb4f35a629d41f4321b1967849c0f05aa3c6a580b69814bfe637
7
+ data.tar.gz: 908bb885c92f1748c6f38609ea02b44fdf187bace3fafffd4764348516d5cf590fdb9aafb3871de5a9feacdcb9bd96cefead9753092b8c5d8711a1a63ae57aef
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.0 (2024-08-02)
2
+
3
+ - Dropped support for Ruby < 3.1
4
+
1
5
  ## 0.3.2 (2023-02-27)
2
6
 
3
7
  - Improved LibTorch and SoX detection for Homebrew on Mac ARM and Linux
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  BSD 2-Clause License
2
2
 
3
3
  Copyright (c) 2017 Facebook Inc. (Soumith Chintala),
4
- Copyright (c) 2020-2023 Andrew Kane,
4
+ Copyright (c) 2020-2024 Andrew Kane,
5
5
  All rights reserved.
6
6
 
7
7
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  :fire: An audio library for Torch.rb
4
4
 
5
- [![Build Status](https://github.com/ankane/torchaudio-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/torchaudio-ruby/actions)
5
+ [![Build Status](https://github.com/ankane/torchaudio-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/torchaudio-ruby/actions)
6
6
 
7
7
  ## Installation
8
8
 
@@ -188,17 +188,17 @@ module TorchAudio
188
188
  shape = waveform.size
189
189
  waveform = waveform.reshape(-1, shape[-1])
190
190
 
191
- raise ArgumentError unless (a_coeffs.size(0) == b_coeffs.size(0))
192
- raise ArgumentError unless (waveform.size.length == 2)
193
- raise ArgumentError unless (waveform.device == a_coeffs.device)
194
- raise ArgumentError unless (b_coeffs.device == a_coeffs.device)
191
+ raise ArgumentError unless a_coeffs.size(0) == b_coeffs.size(0)
192
+ raise ArgumentError unless waveform.size.length == 2
193
+ raise ArgumentError unless waveform.device == a_coeffs.device
194
+ raise ArgumentError unless b_coeffs.device == a_coeffs.device
195
195
 
196
196
  device = waveform.device
197
197
  dtype = waveform.dtype
198
198
  n_channel, n_sample = waveform.size
199
199
  n_order = a_coeffs.size(0)
200
200
  n_sample_padded = n_sample + n_order - 1
201
- raise ArgumentError unless (n_order > 0)
201
+ raise ArgumentError unless n_order > 0
202
202
 
203
203
  # Pad the input and create output
204
204
  padded_waveform = Torch.zeros(n_channel, n_sample_padded, dtype: dtype, device: device)
@@ -1,7 +1,6 @@
1
1
  module TorchAudio
2
2
  module Transforms
3
3
  class MFCC < Torch::NN::Module
4
-
5
4
  SUPPORTED_DCT_TYPES = [2]
6
5
 
7
6
  def initialize(sample_rate: 16000, n_mfcc: 40, dct_type: 2, norm: :ortho, log_mels: false, melkwargs: {})
@@ -1,3 +1,3 @@
1
1
  module TorchAudio
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/torchaudio.rb CHANGED
@@ -5,27 +5,26 @@ require "torch"
5
5
  require "torchaudio/ext"
6
6
 
7
7
  # stdlib
8
- require "csv"
9
8
  require "digest"
10
9
  require "fileutils"
11
10
  require "rubygems/package"
12
11
  require "set"
13
12
 
14
13
  # modules
15
- require "torchaudio/datasets/utils"
16
- require "torchaudio/datasets/yesno"
17
- require "torchaudio/functional"
18
- require "torchaudio/transforms/compute_deltas"
19
- require "torchaudio/transforms/fade"
20
- require "torchaudio/transforms/mel_scale"
21
- require "torchaudio/transforms/mel_spectrogram"
22
- require "torchaudio/transforms/mu_law_encoding"
23
- require "torchaudio/transforms/mu_law_decoding"
24
- require "torchaudio/transforms/spectrogram"
25
- require "torchaudio/transforms/amplitude_to_db"
26
- require "torchaudio/transforms/mfcc"
27
- require "torchaudio/transforms/vol"
28
- require "torchaudio/version"
14
+ require_relative "torchaudio/datasets/utils"
15
+ require_relative "torchaudio/datasets/yesno"
16
+ require_relative "torchaudio/functional"
17
+ require_relative "torchaudio/transforms/compute_deltas"
18
+ require_relative "torchaudio/transforms/fade"
19
+ require_relative "torchaudio/transforms/mel_scale"
20
+ require_relative "torchaudio/transforms/mel_spectrogram"
21
+ require_relative "torchaudio/transforms/mu_law_encoding"
22
+ require_relative "torchaudio/transforms/mu_law_decoding"
23
+ require_relative "torchaudio/transforms/spectrogram"
24
+ require_relative "torchaudio/transforms/amplitude_to_db"
25
+ require_relative "torchaudio/transforms/mfcc"
26
+ require_relative "torchaudio/transforms/vol"
27
+ require_relative "torchaudio/version"
29
28
 
30
29
  module TorchAudio
31
30
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torchaudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-27 00:00:00.000000000 Z
11
+ date: 2024-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: torch-rb
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.11.1
19
+ version: '0.13'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.11.1
26
+ version: '0.13'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rice
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.2
33
+ version: '4.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.2
40
+ version: '4.3'
41
41
  description:
42
42
  email: andrew@ankane.org
43
43
  executables: []
@@ -86,14 +86,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '2.7'
89
+ version: '3.1'
90
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.4.6
96
+ rubygems_version: 3.5.11
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Data manipulation and transformation for audio signal processing