summaryrefslogtreecommitdiff
path: root/training/txt2hdf5.py
diff options
context:
space:
mode:
authorclaude-bot <[email protected]>2026-07-13 12:40:01 +0000
committerclaude-bot <[email protected]>2026-07-13 12:40:01 +0000
commit7d5c8eb943f92a94b420568778d61e0bd6f7df43 (patch)
treec78215ea1d7b79b038c977b78a816af77057c6df /training/txt2hdf5.py
downloadopus-7d5c8eb943f92a94b420568778d61e0bd6f7df43.tar.gz
opus-7d5c8eb943f92a94b420568778d61e0bd6f7df43.zip
Import xiph/opus @ 034c1b61a250457649d788bbf983b3f0fb63f02eHEADmaster
Snapshot for re3/reVC vendoring, per @lzcnt. Source: https://github.com/xiph/opus (034c1b61a250457649d788bbf983b3f0fb63f02e).
Diffstat (limited to 'training/txt2hdf5.py')
-rwxr-xr-xtraining/txt2hdf5.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/training/txt2hdf5.py b/training/txt2hdf5.py
new file mode 100755
index 0000000..9c60287
--- /dev/null
+++ b/training/txt2hdf5.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+from __future__ import print_function
+
+import numpy as np
+import h5py
+import sys
+
+data = np.loadtxt(sys.argv[1], dtype='float32')
+h5f = h5py.File(sys.argv[2], 'w');
+h5f.create_dataset('data', data=data)
+h5f.close()