8afa7fb5dc0ef8bb6f2eb98e97d64821624b4e3c,dlpy/speech_utils.py,,segment_audio,#Any#Any#Any#Any#Any#Any#,142

Before Change


            segment_name = None
            segment_path_after_caslib = None
            segment_path_local = None
            while not segment_name:
                segment_name = random_name(audio_name + str(i), 6) + ".wav"
                segment_path_after_caslib = data_path_after_caslib + segment_name
                segment_path_local = os.path.join(local_path, segment_name)
                if os.path.exists(segment_path_local):
                    segment_name = None
            with wave.open(segment_path_local, "wb") as wave_writer:
                segment_path_after_caslib_list.append(segment_path_after_caslib)
                segment_path_local_list.append(segment_path_local)
                wave_writer.setnchannels(wave_params.nchannels)

After Change



    // segmentation
    segment_nframes_list = calculate_segment_nframes(path, segment_len)
    print("Note:", str(len(segment_nframes_list)), "temporary audio files are created.")

    segment_path_after_caslib_list = []
    segment_path_local_list = []
    with open(listing_path_local, "w") as listing_file:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: sassoftware/python-dlpy
Commit Name: 8afa7fb5dc0ef8bb6f2eb98e97d64821624b4e3c
Time: 2019-08-02
Author: Xiaozhuo.Cheng@sas.com
File Name: dlpy/speech_utils.py
Class Name:
Method Name: segment_audio


Project Name: tensorflow/minigo
Commit Name: 338e1914ab7e73856d292b7b1f2885016db7e4ff
Time: 2018-05-09
Author: tom.ej.madams@gmail.com
File Name: main.py
Class Name:
Method Name: gtp


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: b92890a9f389909a81e6640d527e29a17ae1922f
Time: 2017-08-03
Author: jonwayne@google.com
File Name: speech/cloud-client/transcribe_async.py
Class Name:
Method Name: transcribe_gcs


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: b92890a9f389909a81e6640d527e29a17ae1922f
Time: 2017-08-03
Author: jonwayne@google.com
File Name: speech/cloud-client/transcribe_async.py
Class Name:
Method Name: transcribe_file