def decode_experiment(): foldername = request.form['data'] try: words = quail.decode_speech( path='audio/' + foldername + '/', keypath='google-credentials/credentials.json', save=True, speech_context=speech_context) resp = {"audioDecoded": "success"} except: print('Error decoding audio.') traceback.print_exc() resp = {"audioDecoded": "failed"} return jsonify(**resp)
# -*- coding: utf-8 -*- """ ============================= Decode speech ============================= This example plots free recall accuracy for a single subject. """ # Code source: Andrew Heusser # License: MIT #import import quail # decode speech recall_data = quail.decode_speech('../data/sample.wav', save=True) # print results print(recall_data)
# -*- coding: utf-8 -*- """ ============================= Decode speech ============================= This example plots free recall accuracy for a single subject. """ # Code source: Andrew Heusser # License: MIT #import import quail # decode speech recall_data = quail.decode_speech('../data/sample.wav', save=True, speech_context=['DONKEY', 'PETUNIA']) # print results print(recall_data)
# -*- coding: utf-8 -*- """ ============================= Decode speech ============================= This example plots free recall accuracy for a single subject. """ # Code source: Andrew Heusser # License: MIT #import import quail # decode speech recall_data = quail.decode_speech('../data/sample.wav', save=True, speech_context=['DONKEY', 'PETUNIA'], keypath='path/to/key.json') # print results print(recall_data)
# -*- coding: utf-8 -*- """ ============================= Decode speech ============================= This example plots free recall accuracy for a single subject. """ # Code source: Andrew Heusser # License: MIT #import import quail # decode speech recall_data = quail.decode_speech( '../data/sample.wav', save=True, speech_context=['DONKEY', 'PETUNIA'], keypath= '/Users/andyheusser/Documents/cdl/credentials/efficient-learning-553bf474f805.json' ) # print results print(recall_data)