google / carfac

Cascade of Asymmetric Resonators with Fast-Acting Compression (CARFAC) cochlear model.
Apache License 2.0
116 stars 42 forks source link

Matlab implementation is out of date with modern matlab #5

Open sedurCode opened 3 years ago

sedurCode commented 3 years ago

Several changes to matlab have made the matlab scripts for CARFAC slightly out of date. An example of this is the use of wavreadand wavwrite which mathworks deprecated a couple years ago in favour of audioread and audiowrite. The example code is also slightly platform specific, but the changes to make it platform agnostic are minimal.

dicklyon commented 2 years ago

I think SAI_Run.m is close to what you need. It at least has an example of how to compute SAI frames from CARFAC segment outputs. Dick

On Wed, Jul 13, 2022 at 6:54 PM Pitaya-Lychee @.***> wrote:

Hello, it is my honor to receive the code you shared. May I ask which variable in the code I should observe if I want to extract the SAI image of single frame speech in maltab instead of the log-delayed SAI movie? Looking forward to your reply.

— Reply to this email directly, view it on GitHub https://github.com/google/carfac/issues/5#issuecomment-1183866666, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGW7DD4P2D6RGECHAKTAVDVT5XMRANCNFSM4XOOTAQA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Pitaya-Lychee commented 2 years ago

Oh, sorry,I just noticed this file, but another problem arose. When dealing with log-delay SAI, we set different width and window_width for each layer to constrain the buffer_width, but the SAI_Run.m file requires a sai_struct. Is it also related to the layer_array of each layer in log-delay SAI? Or take another fixed width and window_width? Looking forward to your reply, have a nice day!

------------------ 原始邮件 ------------------ 发件人: "google/carfac" @.>; 发送时间: 2022年7月14日(星期四) 中午1:19 @.>; @.**@.>; 主题: Re: [google/carfac] Matlab implementation is out of date with modern matlab (#5)

I think SAI_Run.m is close to what you need. It at least has an example of how to compute SAI frames from CARFAC segment outputs. Dick

On Wed, Jul 13, 2022 at 6:54 PM Pitaya-Lychee @.***> wrote:

> Hello, it is my honor to receive the code you shared. May I ask which > variable in the code I should observe if I want to extract the SAI image of > single frame speech in maltab instead of the log-delayed SAI movie? Looking > forward to your reply. > > — > Reply to this email directly, view it on GitHub > <https://github.com/google/carfac/issues/5#issuecomment-1183866666&gt;, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABGW7DD4P2D6RGECHAKTAVDVT5XMRANCNFSM4XOOTAQA&gt; > . > You are receiving this because you are subscribed to this thread.Message > ID: @.***> >

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

dicklyon commented 2 years ago

I don't recall and don't have the code in front of me right now, but I believe there's another file by that one called something like SAI_hacking.m, which might give you a good example of how to use it. Dick

On Thu, Jul 14, 2022, 12:51 AM Pitaya-Lychee @.***> wrote:

Oh, sorry,I just noticed this file, but another problem arose. When dealing with log-delay SAI, we set different width and window_width for each layer to constrain the buffer_width, but the SAI_Run.m file requires a sai_struct. Is it also related to the layer_array of each layer in log-delay SAI? Or take another fixed width and window_width? Looking forward to your reply, have a nice day!

------------------ 原始邮件 ------------------ 发件人: "google/carfac" @.>; 发送时间: 2022年7月14日(星期四) 中午1:19 @.>; @.**@.>; 主题: Re: [google/carfac] Matlab implementation is out of date with modern matlab (#5)

I think SAI_Run.m is close to what you need. It at least has an example of how to compute SAI frames from CARFAC segment outputs. Dick

On Wed, Jul 13, 2022 at 6:54 PM Pitaya-Lychee @.***> wrote:

> Hello, it is my honor to receive the code you shared. May I ask which > variable in the code I should observe if I want to extract the SAI image of > single frame speech in maltab instead of the log-delayed SAI movie? Looking > forward to your reply. > > — > Reply to this email directly, view it on GitHub > <https://github.com/google/carfac/issues/5#issuecomment-1183866666&gt;, or > unsubscribe > < https://github.com/notifications/unsubscribe-auth/ABGW7DD4P2D6RGECHAKTAVDVT5XMRANCNFSM4XOOTAQA&gt;

> . > You are receiving this because you are subscribed to this thread.Message > ID: @.***> >

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/google/carfac/issues/5#issuecomment-1184116464, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGW7DCH6OZYO4WNRGLEW2LVT7BITANCNFSM4XOOTAQA . You are receiving this because you commented.Message ID: @.***>