class WhisperPreprocessor extends Preprocessor with Serializable
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- WhisperPreprocessor
- Preprocessor
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new WhisperPreprocessor(feature_size: Int, hop_length: Int, n_fft: Int, n_samples: Int, padding_side: String, padding_value: Float, sampling_rate: Int)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
do_normalize: Boolean
- Definition Classes
- Preprocessor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
extractFeatures(rawFloats: Array[Float]): Array[Array[Float]]
Creates the log-mel spectrogram of given float waveform and transforms it into features for the Whisper model.
Creates the log-mel spectrogram of given float waveform and transforms it into features for the Whisper model. We assume, that the input has not been preprocessed yet.
Adapted from huggingface transformer.
- rawFloats
The waveform to transform into features
- returns
Extracted Features
-
val
feature_size: Int
- Definition Classes
- WhisperPreprocessor → Preprocessor
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val hop_length: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val n_fft: Int
- val n_samples: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
padding_side: String
- Definition Classes
- WhisperPreprocessor → Preprocessor
-
val
padding_value: Float
- Definition Classes
- WhisperPreprocessor → Preprocessor
-
val
return_attention_mask: Boolean
- Definition Classes
- Preprocessor
-
val
sampling_rate: Int
- Definition Classes
- WhisperPreprocessor → Preprocessor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()