xocialize commited on
Commit
f7be312
·
verified ·
1 Parent(s): 97de846

Add Audio8-TTS-Preview-0.6b MLX conversion (bf16 LM + fp32 codec, arktts)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Audio8/Audio8-TTS-Preview-0.6b
4
+ library_name: mlx-audio
5
+ pipeline_tag: text-to-speech
6
+ language:
7
+ - yue
8
+ - zh
9
+ - nl
10
+ - en
11
+ - fr
12
+ - de
13
+ - it
14
+ - ja
15
+ - ko
16
+ - pl
17
+ - es
18
+ tags:
19
+ - mlx
20
+ - audio
21
+ - text-to-speech
22
+ - tts
23
+ - voice-cloning
24
+ - zero-shot
25
+ - multilingual
26
+ - arktts
27
+ ---
28
+
29
+ # Audio8-TTS-Preview-0.6b-bf16 (MLX)
30
+
31
+ MLX conversion of [Audio8/Audio8-TTS-Preview-0.6b](https://huggingface.co/Audio8/Audio8-TTS-Preview-0.6b)
32
+ (revision `1b17c91`) for Apple Silicon — a 0.6B-parameter multilingual text-to-speech
33
+ model with zero-shot voice cloning and a bundled 44.1 kHz neural codec.
34
+
35
+ - **Language model**: bf16 (as published upstream)
36
+ - **Codec**: fp32, converted from `codec.pth` to safetensors with weight-norm folded
37
+ and conv weights in MLX (channels-last) layout
38
+ - **Architecture**: `arktts` — a DualAR transformer (24-layer slow AR predicting one
39
+ semantic token per frame, 4-layer fast AR predicting 10 codec codebooks per frame),
40
+ inspired by Fish Audio S2 Pro
41
+
42
+ Conversion parity vs the PyTorch reference (fp32, CPU): unit/block outputs within
43
+ 1e-4, reference-audio codec encoding 100% code-exact, greedy generation 100%
44
+ token-exact over the validation utterance, decoded waveform max-abs 7.5e-6.
45
+
46
+ ## Usage (mlx-audio)
47
+
48
+ Requires an [mlx-audio](https://github.com/Blaizzy/mlx-audio) version with `arktts`
49
+ support.
50
+
51
+ ```python
52
+ import soundfile as sf
53
+ from mlx_audio.tts.utils import load
54
+
55
+ model = load("mlx-community/Audio8-TTS-Preview-0.6b-bf16")
56
+
57
+ # zero-shot voice cloning: the reference transcript must match the reference audio
58
+ for result in model.generate(
59
+ text="Welcome to Audio8 TTS, running on Apple Silicon.",
60
+ ref_audio="reference.wav",
61
+ ref_text="Transcript of the reference clip.",
62
+ temperature=0.7, top_p=0.9, top_k=50,
63
+ ):
64
+ sf.write("output.wav", result.audio, result.sample_rate)
65
+ ```
66
+
67
+ Without `ref_audio`, the model synthesizes with a default voice.
68
+
69
+ ## Supported languages
70
+
71
+ Cantonese, Chinese, Dutch, English, French, German, Italian, Japanese, Korean,
72
+ Polish, Spanish (per the upstream preview release).
73
+
74
+ ## License
75
+
76
+ Apache-2.0, following the upstream model. The bundled codec weights are part of the
77
+ upstream repository and carry the same license.
codec.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:540d01e161e079fcff67b4a1b78ad5a0158be5b829a494033f4881c563502a3a
3
+ size 1349643293
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ArkttsModel"
4
+ ],
5
+ "attention_o_bias": false,
6
+ "attention_qk_norm": false,
7
+ "attention_qkv_bias": true,
8
+ "codebook_size": 4096,
9
+ "codec_filename": "codec.safetensors",
10
+ "codec_frame_size": 2048,
11
+ "codec_post_intermediate_size": 1216,
12
+ "codec_post_n_head": 16,
13
+ "codec_post_n_layer": 8,
14
+ "codec_post_n_local_heads": 8,
15
+ "codec_sample_rate": 44100,
16
+ "dim": 896,
17
+ "dropout": 0.0,
18
+ "dtype": "bfloat16",
19
+ "eos_token_id": 151645,
20
+ "fast_attention_o_bias": false,
21
+ "fast_attention_qk_norm": false,
22
+ "fast_attention_qkv_bias": false,
23
+ "fast_dim": 896,
24
+ "fast_head_dim": 64,
25
+ "fast_intermediate_size": 4864,
26
+ "fast_n_head": 14,
27
+ "fast_n_local_heads": 2,
28
+ "head_dim": 64,
29
+ "initializer_range": 0.02,
30
+ "intermediate_size": 4864,
31
+ "max_seq_len": 2048,
32
+ "model_type": "arktts",
33
+ "n_fast_layer": 4,
34
+ "n_head": 14,
35
+ "n_layer": 24,
36
+ "n_local_heads": 2,
37
+ "norm_eps": 1e-06,
38
+ "norm_fastlayer_input": true,
39
+ "num_codebooks": 10,
40
+ "pad_token_id": 151643,
41
+ "ras_temperature": 1.0,
42
+ "ras_top_p": 0.9,
43
+ "ras_window_size": 10,
44
+ "rope_base": 1000000,
45
+ "semantic_begin_id": 151678,
46
+ "semantic_end_id": 155773,
47
+ "tie_word_embeddings": true,
48
+ "transformers_version": "4.57.5",
49
+ "use_gradient_checkpointing": false,
50
+ "vocab_size": 155776
51
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": true,
3
+ "eos_token_id": 151645,
4
+ "max_new_tokens": 512,
5
+ "pad_token_id": 151643,
6
+ "temperature": 0.7,
7
+ "top_k": 50,
8
+ "top_p": 0.9,
9
+ "transformers_version": "4.57.5"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2cc2dd288b71a5a476232f30531e0f011a32f27b7b81cdda727c102593f4020
3
+ size 1202343821
special_tokens_map.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f24e08099d45a8adf3f52f5f0b03276e433bb9d689bb15fcbcc48ce58744588b
3
+ size 12217872
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff