mirror of
https://github.com/Andrewcpu/elevenlabs-api.git
synced 2026-05-06 03:00:23 -04:00
Compare commits
1 Commits
v69
...
15-multipl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa4c8bf5db |
111
README.md
111
README.md
@@ -44,33 +44,59 @@ ElevenLabs.setDefaultModel("eleven_monolingual_v1"); // Optional, defaults to: "
|
|||||||
## Simplified Generation Handling with Builders
|
## Simplified Generation Handling with Builders
|
||||||
### v2.7.8 now includes SpeechGenerationBuilder.java
|
### v2.7.8 now includes SpeechGenerationBuilder.java
|
||||||
|
|
||||||
### Speech to Speech
|
[//]: # (### Speech to Speech)
|
||||||
```java
|
|
||||||
//File output
|
[//]: # (```java)
|
||||||
SpeechGenerationBuilder.speechToSpeech()
|
|
||||||
.file() // output type of file (or use .streamed() for an InputStream)
|
[//]: # (//File output)
|
||||||
.setInputFile(File)
|
|
||||||
.setGeneratedAudioOutputFormat(GeneratedAudioOutputFormat.MP3_44100_128)
|
[//]: # (SpeechGenerationBuilder.speechToSpeech())
|
||||||
.setVoiceId("voiceIdString")
|
|
||||||
.setVoiceSettings(VoiceSettings)
|
[//]: # ( .file() // output type of file (or use .streamed() for an InputStream))
|
||||||
.setVoice(Voice) // or use a voice object, which will pull settings / ID out of the Voice
|
|
||||||
.setModelId("modelIdString")
|
[//]: # ( .setInputFile(File))
|
||||||
.setModel(ElevenLabsVoiceModel.ELEVEN_ENGLISH_STS_V2)
|
|
||||||
.setLatencyOptimization(StreamLatencyOptimization.NONE)
|
[//]: # ( .setGeneratedAudioOutputFormat(GeneratedAudioOutputFormat.MP3_44100_128))
|
||||||
.build();
|
|
||||||
//Streamed output
|
[//]: # ( .setVoiceId("voiceIdString"))
|
||||||
SpeechGenerationBuilder.speechToSpeech()
|
|
||||||
.streamed()
|
[//]: # ( .setVoiceSettings(VoiceSettings))
|
||||||
.setInputFile(File)
|
|
||||||
.setGeneratedAudioOutputFormat(GeneratedAudioOutputFormat.MP3_44100_128)
|
[//]: # ( .setVoice(Voice) // or use a voice object, which will pull settings / ID out of the Voice)
|
||||||
.setVoiceId("voiceIdString")
|
|
||||||
.setVoiceSettings(VoiceSettings)
|
[//]: # ( .setModelId("modelIdString"))
|
||||||
.setVoice(Voice) // or use a voice object, which will pull settings / ID out of the Voice
|
|
||||||
.setModelId("modelIdString")
|
[//]: # ( .setModel(ElevenLabsVoiceModel.ELEVEN_ENGLISH_STS_V2))
|
||||||
.setModel(ElevenLabsVoiceModel.ELEVEN_ENGLISH_STS_V2)
|
|
||||||
.setLatencyOptimization(StreamLatencyOptimization.NONE)
|
[//]: # ( .setLatencyOptimization(StreamLatencyOptimization.NONE))
|
||||||
.build();
|
|
||||||
```
|
[//]: # ( .build();)
|
||||||
|
|
||||||
|
[//]: # (//Streamed output)
|
||||||
|
|
||||||
|
[//]: # (SpeechGenerationBuilder.speechToSpeech())
|
||||||
|
|
||||||
|
[//]: # ( .streamed())
|
||||||
|
|
||||||
|
[//]: # ( .setInputFile(File))
|
||||||
|
|
||||||
|
[//]: # ( .setGeneratedAudioOutputFormat(GeneratedAudioOutputFormat.MP3_44100_128))
|
||||||
|
|
||||||
|
[//]: # ( .setVoiceId("voiceIdString"))
|
||||||
|
|
||||||
|
[//]: # ( .setVoiceSettings(VoiceSettings))
|
||||||
|
|
||||||
|
[//]: # ( .setVoice(Voice) // or use a voice object, which will pull settings / ID out of the Voice)
|
||||||
|
|
||||||
|
[//]: # ( .setModelId("modelIdString"))
|
||||||
|
|
||||||
|
[//]: # ( .setModel(ElevenLabsVoiceModel.ELEVEN_ENGLISH_STS_V2))
|
||||||
|
|
||||||
|
[//]: # ( .setLatencyOptimization(StreamLatencyOptimization.NONE))
|
||||||
|
|
||||||
|
[//]: # ( .build();)
|
||||||
|
|
||||||
|
[//]: # (```)
|
||||||
|
|
||||||
### Text to Speech
|
### Text to Speech
|
||||||
```java
|
```java
|
||||||
@@ -240,19 +266,26 @@ public InputStream generateStream(String text, VoiceSettings settings, StreamLat
|
|||||||
|
|
||||||
public InputStream generateStream(String text, StreamLatencyOptimization streamLatencyOptimization);
|
public InputStream generateStream(String text, StreamLatencyOptimization streamLatencyOptimization);
|
||||||
|
|
||||||
public File speechToSpeech(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId, VoiceSettings voiceSettings);
|
|
||||||
|
|
||||||
public File speechToSpeech(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId);
|
|
||||||
|
|
||||||
public File speechToSpeech(File audioFile, String modelId);
|
|
||||||
|
|
||||||
public InputStream speechToSpeechStream(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId, VoiceSettings voiceSettings);
|
|
||||||
|
|
||||||
public InputStream speechToSpeechStream(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId);
|
|
||||||
|
|
||||||
public InputStream speechToSpeechStream(File audioFile, String modelId);
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[//]: # (public File speechToSpeech(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId, VoiceSettings voiceSettings);)
|
||||||
|
|
||||||
|
[//]: # ()
|
||||||
|
[//]: # (public File speechToSpeech(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId);)
|
||||||
|
|
||||||
|
[//]: # ()
|
||||||
|
[//]: # (public File speechToSpeech(File audioFile, String modelId);)
|
||||||
|
|
||||||
|
[//]: # ()
|
||||||
|
[//]: # (public InputStream speechToSpeechStream(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId, VoiceSettings voiceSettings);)
|
||||||
|
|
||||||
|
[//]: # ()
|
||||||
|
[//]: # (public InputStream speechToSpeechStream(File audioFile, StreamLatencyOptimization latencyOptimization, String modelId);)
|
||||||
|
|
||||||
|
[//]: # ()
|
||||||
|
[//]: # (public InputStream speechToSpeechStream(File audioFile, String modelId);)
|
||||||
|
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
## Audio Native Projects
|
## Audio Native Projects
|
||||||
### Creating an Audio Native Project
|
### Creating an Audio Native Project
|
||||||
|
|||||||
Reference in New Issue
Block a user