pytimbre.audio.read_standard_binary_file

pytimbre.audio.read_standard_binary_file(path: str, sample_rate_key: str = 'SAMPLE RATE (HZ)', start_time_key: str = 'TIME (UTC ZULU)', sample_format_key: str = 'SAMPLE FORMAT', data_format_key: str = 'DATA FORMAT', sample_count_key: str = 'SAMPLES TOTAL', s0=None, s1=None, header_only: bool = False)

This will create a waveform object from a Standard Binary File formatted file. :param s1: The end sample to read from the file. If it is None, then the last sample is read :type s1: int :param s0: The first or start sample to read from the file. If it is None, then the data is read from the first :type s0: int :param sample_count_key: The name of the header field that defines the sample count :type sample_count_key: string :param data_format_key: The name of the header field that defines the data format :type data_format_key: string :param sample_format_key: The name of the header field that defines the sample format :type sample_format_key: string :param start_time_key: The name of the header field that defines the start time of the first sample :type start_time_key: string :param sample_rate_key: The name of the header field that defines the number of samples per second :type sample_rate_key: string :param path: The full path to the file to read :type path: string :param header_only: Flag to return the header of the file without reading the remainder of the file :type header_only: bool :return: the contents of the file :rtype: Waveform

import struct