Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.js 698B

12345678910111213141516171819202122232425
  1. // @flow
  2. // Script expects to find rnnoise webassembly binary in the same public path root, otherwise it won't load
  3. // During the build phase this needs to be taken care of manually
  4. import { createRNNWasmModule } from '@jitsi/rnnoise-wasm';
  5. import RnnoiseProcessor from './RnnoiseProcessor';
  6. export { RNNOISE_SAMPLE_LENGTH } from './RnnoiseProcessor';
  7. export type { RnnoiseProcessor };
  8. let rnnoiseModule;
  9. /**
  10. * Creates a new instance of RnnoiseProcessor.
  11. *
  12. * @returns {Promise<RnnoiseProcessor>}
  13. */
  14. export function createRnnoiseProcessor() {
  15. if (!rnnoiseModule) {
  16. rnnoiseModule = createRNNWasmModule();
  17. }
  18. return rnnoiseModule.then(mod => new RnnoiseProcessor(mod));
  19. }