Skip to content

ReferenceError: AudioContext is not defined #115

@arorahardeep

Description

@arorahardeep

Description of the bug:

While running the npm test, tests are failing with error:
FAIL src/App.test.tsx (5.214 s)
✕ renders learn react link (72 ms)

● renders learn react link

ReferenceError: AudioContext is not defined

  41 | const useTextToSpeech =
  42 |     () => {
> 43 |       const audioContext = useRef(new AudioContext());
     |                                       ^
  44 |       const processor =
  45 |           useRef(audioContext.current.createScriptProcessor(1024, 1, 1));
  46 |       const dest = useRef(audioContext.current.createMediaStreamDestination());

  at useTextToSpeech (src/apis/textToSpeech.ts:43:39)

Actual vs expected behavior:

No response

Any other information you'd like to share?

Even while running the App the character appears but the speechtotext part is not working and it can't process any audio

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions