torchaudio 0.3.0 → 0.3.1

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: f35bd53e4a972f24d5d0a0bfbe8ee45a76a203a535a96043608fa768fee71bf4
4
- data.tar.gz: 2a6061fa3aa68c13352ec7c12a79faf85a332163f92b976614fb2f59a1c53d68
3
+ metadata.gz: 40ba5316b924f832befcf352c040528b48da458f53e0a5087530c06604bf7f48
4
+ data.tar.gz: 6235bf05e51dcb4ec1f63596085243e97ed02cde73a5504c5ced1b03a4679434
5
5
  SHA512:
6
- metadata.gz: 3f3566e6d1cc9bf1467c39350a4c317c2e192d75851c96d725f4e128be42b9fe9ab9be9c3b6ff33a4ab23f38d7d63b820f001f5b9e4af888f8e8b9b98fe795a5
7
- data.tar.gz: bde46760427829d4c9955eba0da00f900425e44cb1fe93c6788691c964949d30d9a47ee3e896df226327294018ea4d4149acc25102e85598394644d5f0e3b568
6
+ metadata.gz: c2ec8ae3f0a4fbfb242cf718624828bec8d8b1b741ff119836e7087ea98de43498377c9838eddcb73337db7a56c0d612232aaf7f95d65b7ea05173e93dfae7b8
7
+ data.tar.gz: 02c22f6eeb6bb037ff1d69d781861a60c29bd6f35e4ef76d1793cfb5b9f1696f6309208ec748f6736dd61239f820c65b1a02859c950cff3b2fd97d3fa96bd2f3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.1 (2023-01-29)
2
+
3
+ - Added `format` option
4
+
1
5
  ## 0.3.0 (2022-07-06)
2
6
 
3
7
  - Added `center`, `pad_mode`, and `onesided` options to `Spectogram` transform
@@ -1,3 +1,3 @@
1
1
  module TorchAudio
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/torchaudio.rb CHANGED
@@ -31,9 +31,10 @@ module TorchAudio
31
31
  class Error < StandardError; end
32
32
 
33
33
  class << self
34
+ # TODO remove filetype in 0.4.0
34
35
  def load(
35
36
  filepath, out: nil, normalization: true, channels_first: true, num_frames: 0,
36
- offset: 0, signalinfo: nil, encodinginfo: nil, filetype: nil
37
+ offset: 0, signalinfo: nil, encodinginfo: nil, filetype: nil, format: nil
37
38
  )
38
39
 
39
40
  filepath = filepath.to_s
@@ -59,7 +60,7 @@ module TorchAudio
59
60
 
60
61
  # same logic as C++
61
62
  # could also make read_audio_file work with nil
62
- filetype ||= File.extname(filepath)[1..-1]
63
+ format ||= filetype || File.extname(filepath)[1..-1]
63
64
 
64
65
  sample_rate =
65
66
  Ext.read_audio_file(
@@ -70,7 +71,7 @@ module TorchAudio
70
71
  offset,
71
72
  signalinfo,
72
73
  encodinginfo,
73
- filetype
74
+ format
74
75
  )
75
76
 
76
77
  # normalize if needed
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.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-06 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: torch-rb
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.3.7
96
+ rubygems_version: 3.4.1
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Data manipulation and transformation for audio signal processing