필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to play sound from data

조회 수: 4 (최근 30일)
Elinor Ginzburg
Elinor Ginzburg 2020년 9월 1일
마감: Rik 2020년 9월 1일
Hello,
I'm trying to run the folowing algorithm using Matlab R2019b. I'm able to run it and I'm getting good results, but I can see only the plots, and cannot hear the clean outputed audio.
main algorithms function declaration:
function [esTSNR,esHRNR]=WienerNoiseReduction(ns,fs,IS)
Authors remarks on the main function:
% [esTSNR,esHRNR]=WIENERNOISEREDUCTION(ns,fs,IS)
%
% Title : Wiener Noise Suppressor with TSNR & HRNR algorithms
%
% Description : Wiener filter based on tracking a priori SNR using Decision-Directed
% method, proposed by Plapous et al 2006. The two-step noise reduction
% (TSNR) technique removes the annoying reverberation effect while
% maintaining the benefits of the decision-directed approach. However,
% classic short-time noise reduction techniques, including TSNR, introduce
% harmonic distortion in the enhanced speech. To overcome this problem, a
% method called harmonic regeneration noise reduction (HRNR)is implemented
% in order to refine the a priori SNR used to compute a spectral gain able
% to preserve the speech harmonics.
%
%
% Reference : Plapous, C.; Marro, C.; Scalart, P., "Improved Signal-to-Noise Ratio
% Estimation for Speech Enhancement", IEEE Transactions on Audio, Speech,
% and Language Processing, Vol. 14, Issue 6, pp. 2098 - 2108, Nov. 2006
%
% Input Parameters :
% ns Noisy speech
% fs Sampling frequency (in Hz)
% IS Initial Silence (or non-speech activity) Period (in number of samples)
%
% Output Parameters : enhanced speech
% esTSNR enhanced speech with the Two-Step Noise Reduction method
% esHNRN enhanced speech with the Harmonic Regeneration Noise Reduction method
%
%Author : LIU Ming, 2008
%Modified : SCALART Pascal october, 2008
%
I'm calling the main function like this:
[data, fs] = audioread('noisy.wav');
l = length(data);
samples = (l/fs);
[esTSNR,esHRNR] = WienerNoiseReduction(data,fs,samples);
the output esTSNR,esHRNR has the type 637920x1 double
and I'm trying to play the sound like this:
playerTSNR = audioplayer(esTSNR, fs);
playblocking(playerTSNR);
playerHRNR = audioplayer(esHRNR, fs);
playblocking(playerHRNR);
I've also tried:
sound(esTSNR);
sound(esHRNR);
when I used the sound function I've heared a little bit of the audio, but not all of it.
How can I hear the outputed clean audio?
Thank you.
  댓글 수: 1
Rik
Rik 2020년 9월 1일
Since this is a follow-up of your previous question and you are already getting advice there, I think it makes more sense to close this as duplicate.

답변 (0개)

이 질문은 마감되었습니다.

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by