-
Notifications
You must be signed in to change notification settings - Fork 7
Draft docs #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
milo157
wants to merge
2
commits into
master
Choose a base branch
from
assembly-ai
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Draft docs #247
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| --- | ||
| title: AssemblyAI | ||
| description: Deploy AssemblyAI speech-to-text services on Cerebrium | ||
| --- | ||
|
|
||
| <Note> | ||
| AssemblyAI Partner Service is available from CLI version 1.51.0 and greater | ||
| </Note> | ||
|
|
||
| Cerebrium's partnership with [AssemblyAI](https://www.assemblyai.com/) helps teams deliver speech-to-text (STT) services with efficient deployment, minimized latency, and region selection for data privacy compliance needs. | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Contact the AssemblyAI team in order to get a self-hosted Contract. You can contact them [here]([email protected]) | ||
|
|
||
| 2. Create a simple cerebrium app with the CLI: | ||
|
|
||
| ```bash | ||
| cerebrium init assembly-ai | ||
| ``` | ||
|
|
||
| 3. AssemblyAI services use a simplified TOML configuration with the `[cerebrium.runtime.assemblyai]` section. Create a `cerebrium.toml` file with the following: | ||
|
|
||
| ```toml | ||
| [cerebrium.deployment] | ||
| name = "assembly-ai" | ||
| disable_auth = true | ||
|
|
||
| [cerebrium.runtime.assemblyai] | ||
| port = 8080 | ||
| model_name = "english" | ||
|
|
||
| [cerebrium.hardware] | ||
| cpu = 4 | ||
| memory = 16 | ||
| compute = "AMPERE_A10" | ||
| gpu_count = 1 | ||
| region = "us-east-1" | ||
|
|
||
| [cerebrium.scaling] | ||
| min_replicas = 1 | ||
| max_replicas = 3 | ||
| cooldown = 120 | ||
| replica_concurrency = 32 | ||
| scaling_metric = "concurrency_utilization" | ||
| scaling_target = 70 | ||
| ``` | ||
|
|
||
| <Note> | ||
| The above disables auth meaning anyone can make requests to your endpoint. If | ||
| you set disable_auth=false, then you need to use the API key from your | ||
| Cerebrium Dashboard. key | ||
| </Note> | ||
|
|
||
| 4. Run `cerebrium deploy` to deploy the AssemblyAI service - the output of which should appear as follows: | ||
|
|
||
| ``` | ||
| App Dashboard: https://dashboard.cerebrium.ai/projects/p-xxxxxxxx/apps/p-xxxxxxxx-assembly-ai | ||
| ``` | ||
|
|
||
| 5. Use the Deployment url from the output to send requests to the <b>WS</b> AssemblyAI service. We can use their [example repo](https://github.com/AssemblyAI/streaming-self-hosting-stack) to test its working | ||
|
|
||
| ``` | ||
| 1. git clone https://github.com/AssemblyAI/streaming-self-hosting-stack.git | ||
| 2. cd streaming_example && python example_with_prerecorded_audio_file.py --audio-file example_audio_file.wav --endpoint wss://api.aws.us-east-1.cerebrium.ai/v4/p-xxxxxx/assembly-ai --language english | ||
| ``` | ||
|
|
||
| You should then see the following output: | ||
|
|
||
| ``` | ||
| 0:00:01.040000-0:00:01.200000, end-of-turn: False: it's true | ||
| 0:00:01.040000-0:00:01.280000, end-of-turn: False: it's true that | ||
| 0:00:01.040000-0:00:01.600000, end-of-turn: False: it's true that assem | ||
| 0:00:01.040000-0:00:01.680000, end-of-turn: False: it's true that assembly | ||
| 0:00:01.040000-0:00:02.080000, end-of-turn: False: it's true that assembly a | ||
| 0:00:01.040000-0:00:02.160000, end-of-turn: False: it's true that assembly ai | ||
| 0:00:01.040000-0:00:02.320000, end-of-turn: False: it's true that assembly ai lets | ||
| 0:00:01.040000-0:00:02.400000, end-of-turn: False: it's true that assembly ai lets you | ||
| 0:00:01.040000-0:00:02.560000, end-of-turn: False: it's true that assembly ai lets you build | ||
| ``` | ||
|
|
||
| ## Scaling and Concurrency | ||
|
|
||
| AssemblyAI services support independent scaling configurations: | ||
|
|
||
| - **min_replicas**: Minimum instances to maintain (0 for scale-to-zero). Recommended: 1. | ||
| - **max_replicas**: Maximum instances during high load. | ||
| - **replica_concurrency**: Concurrent requests per instance. Recommended: 3. | ||
| - **cooldown**: Seconds an instance remains active after last request. Recommended: 32. | ||
| - **compute**: Instance type. Recommended: `AMPERE_A10`. | ||
|
|
||
| Adjust these parameters based on traffic patterns and latency requirements. Best would be to consult the Rime team | ||
| about concurrency and scalability | ||
|
Comment on lines
+92
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rime -> AssemblyAI |
||
|
|
||
| For further documentation on AssemblyAI, see the [AssemblyAI documentation](https://www.assemblyai.com/docs/deployment/self-hosted-streaming#getting-the-latest-instructions). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32 -> 28