Recognize a short encoded audio sample and return normalized metadata. More...
Public Member Functions | |
| bool | is_configured (self) |
| Return whether required provider configuration is available. | |
| str|None | provider_name (self) |
| Return a human-readable provider name when configured. | |
| SongRecognitionResult|None | recognize (self, bytes audio, *, int|None sample_bytes=None) |
| Return the best matching song, or None when unmatched. | |
Recognize a short encoded audio sample and return normalized metadata.
| bool song_recognition.song_recognition_if.SongRecognitionIf.is_configured | ( | self | ) |
Return whether required provider configuration is available.
Reimplemented in song_recognition.acrcloud_song_recognizer.AcrCloudSongRecognizer, and song_recognition.unconfigured_song_recognizer.UnconfiguredSongRecognizer.
| str | None song_recognition.song_recognition_if.SongRecognitionIf.provider_name | ( | self | ) |
Return a human-readable provider name when configured.
Reimplemented in song_recognition.acrcloud_song_recognizer.AcrCloudSongRecognizer, and song_recognition.unconfigured_song_recognizer.UnconfiguredSongRecognizer.
| SongRecognitionResult | None song_recognition.song_recognition_if.SongRecognitionIf.recognize | ( | self, | |
| bytes | audio, | ||
| * | , | ||
| int | None | sample_bytes = None ) |
Return the best matching song, or None when unmatched.
| audio | Encoded audio sample sent to the recognition provider. |
| sample_bytes | Optional decoded sample length for provider metadata. |
Reimplemented in song_recognition.acrcloud_song_recognizer.AcrCloudSongRecognizer, and song_recognition.unconfigured_song_recognizer.UnconfiguredSongRecognizer.