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

Compatible with Tensorflow 1.1.0rc1 + Python 3.5.2 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ This model deals with raw speech waveforms on many noise conditions at different
* [improved-gan](https://github.com/openai/improved-gan): implementing improvements to train GANs in a more stable way
* [DCGAN-tensorflow](https://github.com/carpedm20/DCGAN-tensorflow): implementation of the DCGAN in tensorflow

### Dependencies
### Dependencies-Original

* Python 2.7
* TensorFlow 0.12

### Dependencies-Forked by kmjeon, 2017-04-23

* Python 3.5.2
* TensorFlow 1.1.0rc1

You can install the requirements either to your virtualenv or the system via pip with:

```
Expand Down
2 changes: 1 addition & 1 deletion clean_wav.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ echo "SAVE PATH: $SAVE_PATH"
mkdir -p $SAVE_PATH

CUDA_VISIBLE_DEVICES="" python main.py --init_noise_std 0. --save_path segan_v1 \
--batch_size 100 --g_nl prelu --weights SEGAN-41800 \
--batch_size 100 --g_nl prelu --weights SEGAN-72900 \
--test_wav $NOISY_WAVNAME --save_clean_path $SAVE_PATH
6 changes: 3 additions & 3 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def make_z(shape, mean=0., std=1., name='z'):
kwidth = 3
z = make_z([segan.batch_size, h_i.get_shape().as_list()[1],
segan.g_enc_depths[-1]])
h_i = tf.concat(2, [h_i, z])
h_i = tf.concat([h_i, z], 2)
skip_out = True
skips = []
for block_idx, dilation in enumerate(segan.g_dilated_blocks):
Expand Down Expand Up @@ -182,7 +182,7 @@ def make_z(shape, mean=0., std=1., name='z'):
# random code is fused with intermediate representation
z = make_z([segan.batch_size, h_i.get_shape().as_list()[1],
segan.g_enc_depths[-1]])
h_i = tf.concat(2, [z, h_i])
h_i = tf.concat([z, h_i], 2)

#SECOND DECODER (reverse order)
g_dec_depths = segan.g_enc_depths[:-1][::-1] + [1]
Expand Down Expand Up @@ -219,7 +219,7 @@ def make_z(shape, mean=0., std=1., name='z'):
if is_ref:
print('Fusing skip connection of '
'shape {}'.format(skip_.get_shape()))
h_i = tf.concat(2, [h_i, skip_])
h_i = tf.concat([h_i, skip_], 2)

else:
if is_ref:
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main(_):
print('test wave min:{} max:{}'.format(np.min(wave), np.max(wave)))
c_wave = se_model.clean(wave)
print('c wave min:{} max:{}'.format(np.min(c_wave), np.max(c_wave)))
wavfile.write(os.path.join(FLAGS.save_clean_path, wavname), 16e3, c_wave)
wavfile.write(os.path.join(FLAGS.save_clean_path, wavname), 16000, c_wave)
print('Done cleaning {} and saved '
'to {}'.format(FLAGS.test_wav,
os.path.join(FLAGS.save_clean_path, wavname)))
Expand Down
2 changes: 1 addition & 1 deletion make_tfrecords.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def main(opts):
beg_enc_t = timeit.default_timer()
out_file = tf.python_io.TFRecordWriter(out_filepath)
# process the acoustic and textual data now
for dset_i, (dset, dset_desc) in enumerate(cfg_desc.iteritems()):
for dset_i, (dset, dset_desc) in enumerate(cfg_desc.items()):
print('-' * 50)
wav_dir = dset_desc['clean']
wav_files = [os.path.join(wav_dir, wav) for wav in
Expand Down
Loading