Skip to content

Commit

Permalink
Show audio files being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Jan 16, 2024
1 parent bfb9ffc commit a6c001f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
File renamed without changes.
13 changes: 10 additions & 3 deletions docs/docs/audio/speech.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ Marvin can generate speech from text.
```python
import marvin

marvin.speak("I sure like being inside this fancy computer!")
audio = marvin.speak("I sure like being inside this fancy computer!")
```

!!! success "Result"
```python
audio.stream_to_file("path/to/fancy_computer.mp3")
```
<audio controls>
<source src="/assets/audio/hello.mp3" type="audio/mpeg">
<source src="/assets/audio/fancy_computer.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Expand All @@ -38,10 +41,14 @@ Marvin can generate speech from text.
def say_hello(name: str):
return f'Hello, {name}! How are you doing today?'
say_hello("Arthur")

audio = say_hello("Arthur")
```

!!! success "Result"
```python
audio.stream_to_file("path/to/hello_arthur.mp3")
```
<audio controls>
<source src="/assets/audio/hello_arthur.mp3" type="audio/mpeg">
Your browser does not support the audio element.
Expand Down

0 comments on commit a6c001f

Please sign in to comment.