LPCNet icon indicating copy to clipboard operation
LPCNet copied to clipboard

Can you explain the preprocess?

Open zhangjh915 opened this issue 5 years ago • 15 comments

I found there are many tricks in data preprocessing. For example, the smoothing at the silence boundary, the random noise added. Can you summarize the pipeline of the preprocess and explain the tricks that you use? Are all those tricks useful for model training? Thank you!

zhangjh915 avatar Oct 15 '19 13:10 zhangjh915

@zhangjh915 How to get the data preprocessing? i canot find the code.thanks

chengshaodi avatar Sep 18 '21 02:09 chengshaodi

@zhangjh915 How to get the data preprocessing? i canot find the code.thanks

You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c"

zhangjh915 avatar Sep 18 '21 02:09 zhangjh915

bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗?

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

@zhangjh915 How to get the data preprocessing? i canot find the code.thanks

You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 03:11 chengshaodi

bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same).

zhangjh915 avatar Nov 01 '21 03:11 zhangjh915

Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible?

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 06:11 chengshaodi

Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

I simply used np.fromfile(feature_file, dtype='float32') to read the feature file.

zhangjh915 avatar Nov 01 '21 06:11 zhangjh915

Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth?

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

I simply used np.fromfile(feature_file, dtype='float32') to read the feature file.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 06:11 chengshaodi

Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76

zhangjh915 avatar Nov 01 '21 06:11 zhangjh915

When i used './dump_data -train input.s16 features.f32 data.s16'  to get the features.f32,the file lenth is 180000000,so i coudn't to reshape 55d.I just want to remove 18d(BFE).What should I do?Thanks a lot.

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:48 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 07:11 chengshaodi

When i used './dump_data -train input.s16 features.f32 data.s16'  to get the features.f32,the file lenth is 180000000,so i coudn't to reshape 55d.I just want to remove 18d(BFE).What should I do?Thanks a lot. ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:48 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Can you read and try the method in this code? https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L59-L78

zhangjh915 avatar Nov 01 '21 07:11 zhangjh915

Of course,but the features.f32  file comes from './dump_data -train input.s16 features.f32 data.s16',then I write to code 'np.fromfile('.f32',np.float32), np.shape(55,)',the code is error.  Why  should see train_lpcnet? 

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午3:10 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

When i used './dump_data -train input.s16 features.f32 data.s16'  to get the features.f32,the file lenth is 180000000,so i coudn't to reshape 55d.I just want to remove 18d(BFE).What should I do?Thanks a lot. … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:48 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Can you read and try the method in this code? https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L59-L78

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 07:11 chengshaodi

Of course,but the features.f32  file comes from './dump_data -train input.s16 features.f32 data.s16',then I write to code 'np.fromfile('.f32',np.float32), np.shape(55,)',the code is error.  Why  should see train_lpcnet?  ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午3:10 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) When i used './dump_data -train input.s16 features.f32 data.s16'  to get the features.f32,the file lenth is 180000000,so i coudn't to reshape 55d.I just want to remove 18d(BFE).What should I do?Thanks a lot. … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:48 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. Can you read and try the method in this code? https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L59-L78 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Please check my previous replies and the code. Before reshape, there is another line "features = features[:nb_frames*feature_chunk_size*nb_features]". So it must be divided by nb_features, which is 55.

zhangjh915 avatar Nov 01 '21 07:11 zhangjh915

thank you so much.

------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午3:29 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82)

Of course,but the features.f32  file comes from './dump_data -train input.s16 features.f32 data.s16',then I write to code 'np.fromfile('.f32',np.float32), np.shape(55,)',the code is error.  Why  should see train_lpcnet?  … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午3:10 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) When i used './dump_data -train input.s16 features.f32 data.s16'  to get the features.f32,the file lenth is 180000000,so i coudn't to reshape 55d.I just want to remove 18d(BFE).What should I do?Thanks a lot. … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:48 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Me too,then i used np.reshape(55,),why Why can't it be divided into 55d? it's my features is error? The 55d lenth is same lenth? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 下午2:19 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) Thank you.I get the features file from ./dump_data -train input.s16 features.f32 data.s16.Then i want to use numpy to reshape the file to 55d,but i can't. Can you tell me this approach is feasible? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年11月1日(星期一) 中午11:15 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) bro,I get the features.f32 file,i did not divide it into 55d?the file lenth is 180000000.我可以说中文吗? … ------------------ 原始邮件 ------------------ 发件人: "mozilla/LPCNet" @.>; 发送时间: 2021年9月18日(星期六) 上午10:42 @.>; @.@.>; 主题: Re: [mozilla/LPCNet] Can you explain the preprocess? (#82) @zhangjh915 How to get the data preprocessing? i canot find the code.thanks You can use "dump_data" directly following README with input wav.s16 And the code is in "src/dump_data.c" — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. OK, feel free to do so. The feature file needs to be reshaped to 55. And the code has done it for you. Check https://github.com/mozilla/LPCNet/blob/master/training_tf2/train_lpcnet.py (This code is different from what I used but the idea should be the same). — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. I simply used np.fromfile(feature_file, dtype='float32') to read the feature file. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You mean the length cannot be divided by 55? Then just get rid of the rest of the values. Check the older version I used. https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L76 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. Can you read and try the method in this code? https://github.com/mozilla/LPCNet/blob/34d82a9114d97d34489d2dcf6851a925cd4a2f93/src/train_lpcnet.py#L59-L78 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Please check my previous replies and the code. Before reshape, there is another line "features = features[:nb_framesfeature_chunk_sizenb_features]". So it must be divided by nb_features, which is 55.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

chengshaodi avatar Nov 01 '21 07:11 chengshaodi

@chengshaodi Excuse me, how did you get the input s16 file? I have downloaded the datasets in datasets.txt but they are all wav.

RookieImage avatar Mar 06 '22 03:03 RookieImage

I have seen the problem in other issues, thx

RookieImage avatar Mar 06 '22 04:03 RookieImage