Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading flac files #17

Closed
stefantomic opened this issue Jan 20, 2020 · 10 comments
Closed

Loading flac files #17

stefantomic opened this issue Jan 20, 2020 · 10 comments

Comments

@stefantomic
Copy link

Hi, thanks for the great work.

The code seems to show that its possible to load flac files, but the module skips them during inference.

Is there a way to load flac files or I must convert them all to wav?

@anicolson
Copy link
Owner

Hi,

My first hunch as to what is causing this is the saved pickle file for the inference list. Try deleting the 'test_x_list.p' from data and then run it again. I will have to devise a better system if this is the case.

If this doesn't fix the problem, please let me know.

Thanks!

@djo-koconi
Copy link

Thank you for answering Aaron.

As I previously changed the code, I ran it again out of the box to be sure and the error persists: "operands could not be broadcast together with shapes (1,956,257) (0,257)"
I was guessing that it is due to data type differences (int16, float).

Before facing the issue I made the code create pickle file every time, as it was being unable to see when new files are added.

@anicolson
Copy link
Owner

Hi,

Would you be able to send all of the output to terminal?

@djo-koconi
Copy link

Sure.
"
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/stefan/work/DeepXi/p3speech/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Creating test_x list, as no pickle file exists...
The test_x list has a total of 48 entries.
Loading sample statistics from pickle file...
Preparing graph...
Inference...
2%|██▋ | 1/48 [00:05<04:18, 5.50s/it]Traceback (most recent call last):
File "deepxi.py", line 44, in
if args.infer: infer(sess, net, args)
File "lib/dev/infer.py", line 45, in infer
y_MAG = np.multiply(input_feat[0], gain.gfunc(xi_hat, xi_hat+1, gtype=args.gain))
ValueError: operands could not be broadcast together with shapes (1,956,257) (0,257)
"

@anicolson
Copy link
Owner

This is weird. I just ran with a .flac file from Librispeech with no errors. Could you try with a .wav file? I believe you will get the same error with a .wav file. It seems to be successfully making the input features (noisy speech magnitude spectra --- input_feat[0] (1,956,257)), but the output of the network seems to not be correct (0,257).

May I ask if you changed something to do with the network?

Thanks!

@djo-koconi
Copy link

Ohh, that is weird. Wavs do not have any issue.
Could it be that there are different file formats inside the test folder? One wav and other flac.
Ill try and let you know.

I tested it out of github to share you the results before, without any changes applied.

@anicolson
Copy link
Owner

I just tried with .wav and .flac and it worked. I will place the .flac file in set/test_noisy_speech. Will you be able to try it?

@anicolson
Copy link
Owner

it is a clean speech file, but that doesn't matter. See if you can run with those two files. I am able to for some reason.

@djo-koconi
Copy link

It is showing the same error and breaking on flac file. I cloned it clean and just ran the command shown on github with "python3 deepxi.py --infer 1 --out_type y --gain mmse-lsa --ver '3f' --epoch 175 --gpu 5"

Maybe due to system configuration, but waves are running fine.

Thank you very much eather way, your response its highly appreciated.

@anicolson
Copy link
Owner

That's a shame. I will have another look at it. Please let me know if you find a fix.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants