Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How to play sound from data
2 ビュー (過去 30 日間)
古いコメントを表示
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
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 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!