runapi-fish-audio 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/runapi/fish_audio/contract_gen.rb +65 -2
- data/lib/runapi/fish_audio/resources/text_to_speech.rb +1 -1
- data/lib/runapi/fish_audio/types.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 370d607320f1810125fdf732de7b8ec975b26ca62c47b1886338601ebdec10db
|
|
4
|
+
data.tar.gz: 86236d72fc06d5e105701df377d11542d5b291828c4cad809017505d1a85c58f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57c267f3e0e8cf89caef1f2d7032363b79a8e7ae3809350887936a2e0d29912f56e8e3e2bea6fd1c0fc04076ab21cf084dd7f7c17a681fadda68cf8f243777b8
|
|
7
|
+
data.tar.gz: 100dfc8467279f6b2901f44269962fdb3d4ca630aa83cf5a50bcdc632fdd0572257aabe4ea7728730156fa7f6d8fa9e6a4e86d0acf31f9c7faa97b5ef024d19a
|
data/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Fish Audio Ruby SDK for RunAPI
|
|
2
2
|
|
|
3
|
-
Install `runapi-fish-audio`, create `RunApi::FishAudio::Client`, and call `client.text_to_speech.run(model: "
|
|
3
|
+
Install `runapi-fish-audio`, create `RunApi::FishAudio::Client`, and call `client.text_to_speech.run(model: "s2.1-pro", text: "Hello [excited]", output_format: "wav", sample_rate_hz: 44_100)`.
|
|
4
4
|
|
|
5
5
|
Pass optional `references` entries with base64-encoded raw audio bytes and exact transcripts for request-scoped voice matching.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The output defaults to MP3. Select WAV with `output_format`; `bitrate_kbps` applies only to MP3.
|
|
8
|
+
|
|
9
|
+
Model details and pricing: https://runapi.ai/models/fish-audio/s2.1-pro
|
|
8
10
|
|
|
9
11
|
Licensed under the Apache License, Version 2.0.
|
|
@@ -4,25 +4,88 @@ module RunApi
|
|
|
4
4
|
module FishAudio
|
|
5
5
|
CONTRACT = {
|
|
6
6
|
"text-to-speech" => {
|
|
7
|
-
"models" => ["s1", "s2-pro"],
|
|
7
|
+
"models" => ["s1", "s2-pro", "s2.1-pro"],
|
|
8
8
|
"fields_by_model" => {
|
|
9
9
|
"s1" => {
|
|
10
|
+
"bitrate_kbps" => {
|
|
11
|
+
"enum" => [64, 128, 192],
|
|
12
|
+
"type" => "integer"
|
|
13
|
+
},
|
|
10
14
|
"model" => {
|
|
11
15
|
"required" => true
|
|
12
16
|
},
|
|
17
|
+
"output_format" => {
|
|
18
|
+
"enum" => ["mp3", "wav"]
|
|
19
|
+
},
|
|
20
|
+
"sample_rate_hz" => {
|
|
21
|
+
"enum" => [8000, 16000, 24000, 32000, 44100],
|
|
22
|
+
"type" => "integer"
|
|
23
|
+
},
|
|
13
24
|
"text" => {
|
|
14
25
|
"required" => true
|
|
15
26
|
}
|
|
16
27
|
},
|
|
17
28
|
"s2-pro" => {
|
|
29
|
+
"bitrate_kbps" => {
|
|
30
|
+
"enum" => [64, 128, 192],
|
|
31
|
+
"type" => "integer"
|
|
32
|
+
},
|
|
33
|
+
"model" => {
|
|
34
|
+
"required" => true
|
|
35
|
+
},
|
|
36
|
+
"output_format" => {
|
|
37
|
+
"enum" => ["mp3", "wav"]
|
|
38
|
+
},
|
|
39
|
+
"sample_rate_hz" => {
|
|
40
|
+
"enum" => [8000, 16000, 24000, 32000, 44100],
|
|
41
|
+
"type" => "integer"
|
|
42
|
+
},
|
|
43
|
+
"text" => {
|
|
44
|
+
"required" => true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"s2.1-pro" => {
|
|
48
|
+
"bitrate_kbps" => {
|
|
49
|
+
"enum" => [64, 128, 192],
|
|
50
|
+
"type" => "integer"
|
|
51
|
+
},
|
|
18
52
|
"model" => {
|
|
19
53
|
"required" => true
|
|
20
54
|
},
|
|
55
|
+
"output_format" => {
|
|
56
|
+
"enum" => ["mp3", "wav"]
|
|
57
|
+
},
|
|
58
|
+
"sample_rate_hz" => {
|
|
59
|
+
"enum" => [8000, 16000, 24000, 32000, 44100],
|
|
60
|
+
"type" => "integer"
|
|
61
|
+
},
|
|
21
62
|
"text" => {
|
|
22
63
|
"required" => true
|
|
23
64
|
}
|
|
24
65
|
}
|
|
25
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"rules" => [{
|
|
68
|
+
"when" => {
|
|
69
|
+
"output_format" => "wav"
|
|
70
|
+
},
|
|
71
|
+
"forbidden" => ["bitrate_kbps"]
|
|
72
|
+
}, {
|
|
73
|
+
"enum" => {
|
|
74
|
+
"sample_rate_hz" => [32000, 44100]
|
|
75
|
+
},
|
|
76
|
+
"when" => {
|
|
77
|
+
"output_format" => "mp3"
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
"enum" => {
|
|
81
|
+
"sample_rate_hz" => [32000, 44100]
|
|
82
|
+
},
|
|
83
|
+
"when" => {
|
|
84
|
+
"output_format" => {
|
|
85
|
+
"present" => false
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}]
|
|
26
89
|
}
|
|
27
90
|
}.freeze
|
|
28
91
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-fish-audio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RunAPI
|
|
@@ -15,16 +15,17 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.3.
|
|
18
|
+
version: 0.3.3
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.3.
|
|
25
|
+
version: 0.3.3
|
|
26
26
|
description: 'Install `runapi-fish-audio`, create `RunApi::FishAudio::Client`, and
|
|
27
|
-
call `client.text_to_speech.run(model: "
|
|
27
|
+
call `client.text_to_speech.run(model: "s2.1-pro", text: "Hello [excited]", output_format:
|
|
28
|
+
"wav", sample_rate_hz: 44_100)`.'
|
|
28
29
|
email:
|
|
29
30
|
- contact@runapi.ai
|
|
30
31
|
executables: []
|