I am learning to use matlab and trying to use this programme called STRAIGHT from this…
- User
I am learning to use matlab and trying to use this programme called STRAIGHT from this page: https://github.com/HidekiKawahara/legacy_STRAIGHT can you tell me from the start, what doesa it mean to "Set MATLAB path to "src" directory."
- Assistant
Setting the MATLAB path to the "src" directory means that you need to add the directory containing the STRAIGHT source code to MATLAB's search path.
MATLAB uses the path to locate the required functions and scripts when you run your code. By adding the directory to the MATLAB path, you ensure that MATLAB can find and access the STRAIGHT functions and scripts when you try to use them.
To set the MATLAB path to the "src" directory:
- Download the STRAIGHT source code from the GitHub repository you mentioned (https://github.com/HidekiKawahara/legacy_STRAIGHT).
- Extract the downloaded files to a specific folder on your computer.
- Open MATLAB.
- In the MATLAB command window, type "pathtool" and press Enter. This will open the "Set Path" window.
- In the "Set Path" window, click on the "Add Folder" button.
- Browse and select the "src" directory that you extracted in step 2.
- Click on the "Save" button to save the changes.
- Close the "Set Path" window.
By following these steps, you have added the "src" directory containing the STRAIGHT source code to the MATLAB path. Now, MATLAB will be able to find and access the functions and scripts provided by STRAIGHT.
- User
I paste the code in the quickstart part in the previous link and run it, namely "[x, fs] = audioread('vaiueo2d.wav'); f0raw = MulticueF0v14(x,fs); ap = exstraightAPind(x,fs,f0raw); n3sgram=exstraightspec(x,f0raw,fs); syntheszed_signal = exstraightsynth(f0raw,n3sgram,ap,fs);", and the comman window shows"fir1 需要 Signal Processing Toolbox。
出错 MulticueF0v14>cleaninglownoise (第 696 行) wlp=fir1(flp*2,f0floor/(fs/2));
出错 MulticueF0v14>zfixpF0VexMltpBG4 (第 464 行) x=cleaninglownoise(x,fs,f0floor);
出错 MulticueF0v14>SourceInfobyMultiCues050111 (第 253 行) zfixpF0VexMltpBG4(x,fs,f0floor,nvc,nvo,mu,imgi,shiftm,smp,minm,pcIF,ncIF);
出错 MulticueF0v14 (第 60 行) [f0raw,vuv,auxouts,prm]=SourceInfobyMultiCues050111(x,fs,prmin);" what should i do
- Assistant
The error you encountered is related to the function
fir1which requires the Signal Processing Toolbox in MATLAB. The STRAIGHT package relies on this toolbox for some of its functionalities.To resolve this issue, you have two options:
-
Install the Signal Processing Toolbox: If you have access to the Signal Processing Toolbox, you can install it in MATLAB. This toolbox provides various signal processing functions and will enable the
fir1function to work. To install the toolbox, go to the "Home" tab in MATLAB, click on "Add-Ons" and then select "Get Add-Ons". Search for the Signal Processing Toolbox and install it. -
Modify the code: If you do not have access to the Signal Processing Toolbox, you can modify the code to use an alternative method for low-pass filtering. Instead of using , you can use a different low-pass filter implementation available in MATLAB, such as or functions. Here's an example of how you can modify the code:
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.