czyoung commited on
Commit
8b1487a
·
verified ·
1 Parent(s): dd91a12

Added comments

Browse files
Files changed (1) hide show
  1. sonogram.py +20 -0
sonogram.py CHANGED
@@ -85,6 +85,26 @@ class Sonogram():
85
  return diarizationOutput, totalTimeInSeconds, waveformGainAdjusted, sampleRate
86
 
87
  def __call__(self,audioPath):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  diarizationOutput, totalTimeInSeconds, waveformGainAdjusted, sampleRate = self.processFile(audioPath)
89
  annotation = diarizationOutput.speaker_diarization
90
 
 
85
  return diarizationOutput, totalTimeInSeconds, waveformGainAdjusted, sampleRate
86
 
87
  def __call__(self,audioPath):
88
+ '''
89
+ Processes audio file to generate results necessary for app
90
+
91
+ filePath : string
92
+ Path to the audio file
93
+
94
+ Returns
95
+ --------
96
+ annotation : pyannote.core.annotation
97
+ found here https://pyannote.github.io/pyannote-core/_modules/pyannote/core/annotation.html
98
+
99
+ totalTimeInSeconds : int
100
+ Approximate total seconds of audio file
101
+
102
+ waveformGainAdjusted : np.array
103
+ The waveform of the audio file after equalization
104
+
105
+ sampleRate : int
106
+ The sample rate of the audio file
107
+ '''
108
  diarizationOutput, totalTimeInSeconds, waveformGainAdjusted, sampleRate = self.processFile(audioPath)
109
  annotation = diarizationOutput.speaker_diarization
110