@@ -534,27 +534,23 @@ def _compile_metadata(self):
534
534
'model' : str (model_hash )
535
535
}
536
536
537
- def _upload_wake_word (self , audio , metadata ):
538
- requests .post (
539
- self .upload_url , files = {
540
- 'audio' : BytesIO (audio .get_wav_data ()),
541
- 'metadata' : StringIO (json .dumps (metadata ))
542
- }
543
- )
544
-
545
537
def trigger_listen (self ):
546
538
"""Externally trigger listening."""
547
539
LOG .debug ('Listen triggered from external source.' )
548
540
self ._listen_triggered = True
549
541
550
542
def _upload_wakeword (self , audio , metadata ):
551
543
"""Upload the wakeword in a background thread."""
552
- def upload (audio , metadata ):
553
- requests .post (self .upload_url ,
554
- files = {'audio' : BytesIO (audio .get_wav_data ()),
555
- 'metadata' : StringIO (json .dumps (metadata ))})
556
-
557
- Thread (target = upload , daemon = True , args = (audio , metadata )).start ()
544
+ LOG .debug (
545
+ "Wakeword uploading has been disabled. The API endpoint used in "
546
+ "Mycroft-core v20.2 and below has been deprecated. To contribute "
547
+ "new wakeword samples please upgrade to v20.8 or above."
548
+ )
549
+ # def upload(audio, metadata):
550
+ # requests.post(self.upload_url,
551
+ # files={'audio': BytesIO(audio.get_wav_data()),
552
+ # 'metadata': StringIO(json.dumps(metadata))})
553
+ # Thread(target=upload, daemon=True, args=(audio, metadata)).start()
558
554
559
555
def _send_wakeword_info (self , emitter ):
560
556
"""Send messagebus message indicating that a wakeword was received.
0 commit comments