mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
_
This commit is contained in:
parent
3130773b94
commit
721b88631a
@ -131,7 +131,7 @@ export class AudioClip extends PsychObject
|
|||||||
* e.g. 'en-gb'
|
* e.g. 'en-gb'
|
||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async transcribe({engine, languageCode} = {})
|
async transcribe({engine, languageCode, key} = {})
|
||||||
{
|
{
|
||||||
this._psychoJS.logger.debug('request to transcribe the audio clip');
|
this._psychoJS.logger.debug('request to transcribe the audio clip');
|
||||||
|
|
||||||
@ -166,8 +166,7 @@ export class AudioClip extends PsychObject
|
|||||||
};
|
};
|
||||||
|
|
||||||
// TODO get the key from the designer's pavlovia account
|
// TODO get the key from the designer's pavlovia account
|
||||||
const GOOGLE_API_KEY = '***REMOVED***';
|
const url = `https://speech.googleapis.com/v1/speech:recognize?key=${key}`;
|
||||||
const url = `https://speech.googleapis.com/v1/speech:recognize?key=${GOOGLE_API_KEY}`;
|
|
||||||
|
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Loading…
Reference in New Issue
Block a user