-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VBLOCKS-2030 | API stubs and error checking (#202)
* AudioProcessor interface * Adding add and remove api * lint * Address PR reviews * Update audiohelper.ts
- Loading branch information
1 parent
884aba3
commit 5508dfe
Showing
3 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* @packageDocumentation | ||
* @module Voice | ||
*/ | ||
|
||
/** | ||
* Represents an AudioProcessor object that receives an audio stream for processing. | ||
* @publicapi | ||
*/ | ||
interface AudioProcessor { | ||
/** | ||
* Called whenever the active input audio stream is updated | ||
* and is ready for processing such as adding audio filters | ||
* or removing background noise. | ||
* Use this method to initiate your audio processing pipeline. | ||
* | ||
* @param stream The input audio stream. | ||
* @returns The modified input audio stream after applying filters. | ||
*/ | ||
createProcessedStream(stream: MediaStream): Promise<MediaStream>; | ||
|
||
/** | ||
* Called after the processed stream has been destroyed. | ||
* This happens whenever the current input stream is updated. | ||
* Use this method to run any necessary teardown routines | ||
* needed by your audio processing pipeline. | ||
* | ||
* @param stream The torn down processed audio stream. | ||
* @returns | ||
*/ | ||
destroyProcessedStream(stream: MediaStream): Promise<void>; | ||
} | ||
|
||
export default AudioProcessor; |