TextToCloneSpeech / convert_model.py
Emmylahot12's picture
Create convert_model.py
6891500 verified
raw
history blame contribute delete
451 Bytes
from keras.models import model_from_json
# Step 1: Load the model architecture from JSON
with open("model/model_config.json", "r") as json_file:
model_json = json_file.read()
model = model_from_json(model_json)
# Step 2: Load weights into the model
model.load_weights("model/model_weights.h5")
# Step 3: Save the full model as a single .h5 file
model.save("clone_tts_model.h5")
print("Successfully saved the full model as clone_tts_model.h5")