Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of Dominant Speaker Identification for Multipoint Videoconferencing by Ilana Volfin and Israel Cohen. This implementation uses the RTP Audio Level extension from RFC-6464 for the input signal
- Loading branch information
1 parent
f7d204d
commit 34dcdcd
Showing
28 changed files
with
1,824 additions
and
8 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; | ||
import { RtpObserver } from './RtpObserver'; | ||
import { Producer } from './Producer'; | ||
export interface ActiveSpeakerObserverOptions { | ||
interval?: number; | ||
/** | ||
* Custom application data. | ||
*/ | ||
appData?: any; | ||
} | ||
export interface ActiveSpeakerObserverActivity { | ||
/** | ||
* The producer instance. | ||
*/ | ||
producer: Producer; | ||
} | ||
export declare class ActiveSpeakerObserver extends RtpObserver { | ||
/** | ||
* @private | ||
*/ | ||
constructor(params: any); | ||
/** | ||
* Observer. | ||
*/ | ||
get observer(): EnhancedEventEmitter; | ||
private _handleWorkerNotifications; | ||
} | ||
//# sourceMappingURL=ActiveSpeakerObserver.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,40 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Logger_1 = require("./Logger"); | ||
const RtpObserver_1 = require("./RtpObserver"); | ||
const logger = new Logger_1.Logger('ActiveSpeakerObserver'); | ||
class ActiveSpeakerObserver extends RtpObserver_1.RtpObserver { | ||
/** | ||
* @private | ||
*/ | ||
constructor(params) { | ||
super(params); | ||
this._handleWorkerNotifications(); | ||
} | ||
/** | ||
* Observer. | ||
*/ | ||
get observer() { | ||
return this._observer; | ||
} | ||
_handleWorkerNotifications() { | ||
this._channel.on(this._internal.rtpObserverId, (event, data) => { | ||
switch (event) { | ||
case 'dominantspeaker': | ||
{ | ||
const dominantSpeaker = { | ||
producer: this._getProducerById(data.producerId) | ||
}; | ||
this.safeEmit('dominantspeaker', dominantSpeaker); | ||
this._observer.safeEmit('dominantspeaker', dominantSpeaker); | ||
break; | ||
} | ||
default: | ||
{ | ||
logger.error('ignoring unknown event "%s"', event); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
exports.ActiveSpeakerObserver = ActiveSpeakerObserver; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.