audio_analysis 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/audio_analysis.rb +7 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a1c982a664f5cea0335d76a00b15057db67c92bbdf3a25f4972b201defb7409
|
4
|
+
data.tar.gz: 98884a8ab4ebc3b098e961b9c58f1261fa1d8f2df1a541d5491d1114765c0f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fb0f096e78c10d32bb822e51ddd6bccd9e12874580c6a875056836f0f55d116551da7799bb69f4b8bc2b6cdc709b2e3bdd963ca233a60fca010d9858210dc6a
|
7
|
+
data.tar.gz: 80df53e6a53b1d4a74d3ae23469774994caaa01f2ff5d52e5104175a39c9ee1973b731f838ea64f580c6dddca419d3f5ee09f2718f38a452f66f718ca26e885d
|
data/lib/audio_analysis.rb
CHANGED
@@ -1,25 +1,19 @@
|
|
1
1
|
class AudioAnalysis
|
2
2
|
def self.find_bpm(file_path)
|
3
|
-
`pip install -r
|
4
|
-
bpm = `python3
|
3
|
+
`pip install -r lib/python_analysis/requirements.txt`
|
4
|
+
bpm = `python3 lib/python_analysis/bpm_analysis.py #{file_path}`
|
5
5
|
bpm.to_f
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.find_key(file_path)
|
9
|
-
`pip install -r
|
10
|
-
`python3
|
9
|
+
`pip install -r lib/python_analysis/requirements.txt`
|
10
|
+
`python3 lib/python_analysis/key_analysis.py #{file_path}`
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.analyze(file_path)
|
14
|
-
`pip install -r
|
15
|
-
bpm = `python3
|
16
|
-
key =`python3
|
14
|
+
`pip install -r lib/python_analysis/requirements.txt`
|
15
|
+
bpm = `python3 lib/python_analysis/bpm_analysis.py #{file_path}`
|
16
|
+
key =`python3 lib/python_analysis/key_analysis.py #{file_path}`
|
17
17
|
{ bpm: bpm, key: key }
|
18
18
|
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def self.gem_path
|
23
|
-
Gem.datadir("audio_analysis")
|
24
|
-
end
|
25
19
|
end
|