當前位置: 首頁>>代碼示例>>Python>>正文


Python hparams.power方法代碼示例

本文整理匯總了Python中hparams.hparams.power方法的典型用法代碼示例。如果您正苦於以下問題:Python hparams.power方法的具體用法?Python hparams.power怎麽用?Python hparams.power使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hparams.hparams的用法示例。


在下文中一共展示了hparams.power方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: inv_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram(spectrogram):
    S = _db_to_amp(_denormalize(spectrogram) + hparams.ref_level_db)  # Convert back to linear
    return _inv_preemphasis(_griffin_lim(S ** hparams.power))  # Reconstruct phase 
開發者ID:candlewill,項目名稱:Griffin_lim,代碼行數:5,代碼來源:audio.py

示例2: _db_to_amp

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def _db_to_amp(x):
    return np.power(10.0, x * 0.05) 
開發者ID:candlewill,項目名稱:Griffin_lim,代碼行數:4,代碼來源:audio.py

示例3: inv_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram(spectrogram):
    S = _db_to_amp(_denormalize(spectrogram) + hparams.ref_level_db)  # Convert back to linear
    return _inv_preemphasis(spectrogram2wav(S ** hparams.power))  # Reconstruct phase 
開發者ID:candlewill,項目名稱:Griffin_lim,代碼行數:5,代碼來源:griffin_lim.py

示例4: inv_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram(spectrogram):
  '''Converts spectrogram to waveform using librosa'''
  S = _db_to_amp(_denormalize(spectrogram) + hparams.ref_level_db)  # Convert back to linear
  return inv_preemphasis(_griffin_lim(S ** hparams.power))          # Reconstruct phase 
開發者ID:yanggeng1995,項目名稱:vae_tacotron,代碼行數:6,代碼來源:audio.py

示例5: inv_spectrogram_tensorflow

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram_tensorflow(spectrogram):
  '''Builds computational graph to convert spectrogram to waveform using TensorFlow.

  Unlike inv_spectrogram, this does NOT invert the preemphasis. The caller should call
  inv_preemphasis on the output after running the graph.
  '''
  S = _db_to_amp_tensorflow(_denormalize_tensorflow(spectrogram) + hparams.ref_level_db)
  return _griffin_lim_tensorflow(tf.pow(S, hparams.power)) 
開發者ID:yanggeng1995,項目名稱:vae_tacotron,代碼行數:10,代碼來源:audio.py

示例6: _db_to_amp

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def _db_to_amp(x):
  return np.power(10.0, x * 0.05) 
開發者ID:yanggeng1995,項目名稱:vae_tacotron,代碼行數:4,代碼來源:audio.py

示例7: inv_linear_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_linear_spectrogram(linear_spectrogram):
	'''Converts linear spectrogram to waveform using librosa'''
	if hparams.signal_normalization:
		D = _denormalize(linear_spectrogram)
	else:
		D = linear_spectrogram

	S = _db_to_amp(D + hparams.ref_level_db) #Convert back to linear

	return _griffin_lim(S ** hparams.power) 
開發者ID:rishikksh20,項目名稱:vae_tacotron2,代碼行數:12,代碼來源:audio.py

示例8: inv_mel_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_mel_spectrogram(mel_spectrogram):
	'''Converts mel spectrogram to waveform using librosa'''
	if hparams.signal_normalization:
		D = _denormalize(mel_spectrogram)
	else:
		D = mel_spectrogram

	S = _mel_to_linear(_db_to_amp(D + hparams.ref_level_db))  # Convert back to linear

	return _griffin_lim(S ** hparams.power) 
開發者ID:rishikksh20,項目名稱:vae_tacotron2,代碼行數:12,代碼來源:audio.py

示例9: _db_to_amp

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def _db_to_amp(x):
	return np.power(10.0, (x) * 0.05) 
開發者ID:rishikksh20,項目名稱:vae_tacotron2,代碼行數:4,代碼來源:audio.py

示例10: inv_mel_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_mel_spectrogram(mel_spectrogram):
	'''Converts mel spectrogram to waveform using librosa'''
	if hparams.mel_normalization:
		D = _denormalize(mel_spectrogram)
	else:
		D = mel_spectrogram

	S = _mel_to_linear(_db_to_amp(D + hparams.ref_level_db))  # Convert back to linear

	return _griffin_lim(S ** hparams.power) 
開發者ID:rishikksh20,項目名稱:vae_tacotron2,代碼行數:12,代碼來源:audio.py

示例11: inv_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram(spectrogram):
    '''Converts spectrogram to waveform using librosa'''
    S = _db_to_amp(_denormalize(spectrogram) + hparams.ref_level_db)  # Convert back to linear
    processor = _lws_processor()
    D = processor.run_lws(S.astype(np.float64).T ** hparams.power)
    y = processor.istft(D).astype(np.float32)
    return inv_preemphasis(y) 
開發者ID:G-Wang,項目名稱:WaveRNN-Pytorch,代碼行數:9,代碼來源:audio.py

示例12: inv_spectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_spectrogram(spectrogram):
	'''Converts spectrogram to waveform using librosa'''
	S = _db_to_amp(_denormalize(spectrogram) + hps.ref_level_db)	# Convert back to linear
	return inv_preemphasis(_griffin_lim(S ** hps.power))			# Reconstruct phase 
開發者ID:BogiHsu,項目名稱:Tacotron2-PyTorch,代碼行數:6,代碼來源:audio.py

示例13: inv_melspectrogram

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def inv_melspectrogram(spectrogram):
	mel = _db_to_amp(_denormalize(spectrogram) + hps.ref_level_db)
	S = _mel_to_linear(mel)
	return inv_preemphasis(_griffin_lim(S ** hps.power)) 
開發者ID:BogiHsu,項目名稱:Tacotron2-PyTorch,代碼行數:6,代碼來源:audio.py

示例14: _db_to_amp

# 需要導入模塊: from hparams import hparams [as 別名]
# 或者: from hparams.hparams import power [as 別名]
def _db_to_amp(x):
	return np.power(10.0, x * 0.05) 
開發者ID:BogiHsu,項目名稱:Tacotron2-PyTorch,代碼行數:4,代碼來源:audio.py


注:本文中的hparams.hparams.power方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。