未验证 提交 bba3faa5 编写于 作者: J Jeff Wang 提交者: GitHub

Provide demo code for text (#381)

* Provide demo code how on to create text records.

* Remove test code
上级 1ebd604f
......@@ -118,7 +118,20 @@ with logw.mode("train") as logger:
audio.finish_sampling()
# Create text
with logw.mode("train") as logger:
text = logger.text("scratch/generated_text1")
ascii_a = ord('a')
ascii_z = ord('z')
# Generate 100 random text
for i in range(100):
str = ''
for j in range(8):
str += chr(random.randint(ascii_a, ascii_z))
# Add a new text record to the log writer
text.add_record(i, str)
def download_graph_image():
'''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册