コード例 #1
0
ファイル: custom.py プロジェクト: ContextLab/autoFR
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)
コード例 #2
0
ファイル: decode_speech.py プロジェクト: mkclairhong/quail
# -*- 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)
コード例 #3
0
ファイル: decode_speech.py プロジェクト: mkclairhong/quail
# -*- 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)
コード例 #4
0
# -*- 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)
コード例 #5
0
# -*- 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)