You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text = response['choices'][0]['text'].replace('\n', '').replace(' .', '.').strip()
85
85
print('Azure OpenAI response:' + text)
86
86
@@ -130,6 +130,7 @@ Follow these steps to create a new console application.
130
130
except Exception as err:
131
131
print("Encountered exception. {}".format(err))
132
132
```
133
+
1. To increase or decrease the number of tokens returned by Azure OpenAI, change the `max_tokens` parameter. For more information tokens and cost implications, see [Azure OpenAI tokens](/azure/cognitive-services/openai/overview#tokens) and [Azure OpenAI pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/).
133
134
134
135
Run your new console application to start speech recognition from a microphone:
135
136
@@ -149,9 +150,9 @@ Recognized speech:Make a comma separated list of all continents.
149
150
Azure OpenAI response:Africa, Antarctica, Asia, Australia, Europe, North America, South America
150
151
Speech synthesized to speaker for text [Africa, Antarctica, Asia, Australia, Europe, North America, South America]
151
152
Azure OpenAI is listening. Say 'Stop' or press Ctrl-Z to end the conversation.
152
-
Recognized speech:Make a comma separated list of 1 Astronomical observatory for each continent. The list should include each continent name in parentheses.
153
-
Azure OpenAI response:Mauna Kea Observatory (North America), European Southern Observatory (Europe), Atacama Large Millimeter Array (South America), Siding Spring Observatory (Australia), and South African Astronomical Observatory (Africa)
154
-
Speech synthesized to speaker for text [Mauna Kea Observatory (North America), European Southern Observatory (Europe), Atacama Large Millimeter Array (South America), Siding Spring Observatory (Australia), and South African Astronomical Observatory (Africa)]
153
+
Recognized speech:Make a comma separated list of 1 Astronomical observatory for each continent. A list should include each continent name in parentheses.
154
+
Azure OpenAI response:Mauna Kea Observatories (North America), La Silla Observatory (South America), Tenerife Observatory (Europe), Siding Spring Observatory (Australia), Beijing Xinglong Observatory (Asia), Naukluft Plateau Observatory (Africa), Rutherford Appleton Laboratory (Antarctica)
155
+
Speech synthesized to speaker for text [Mauna Kea Observatories (North America), La Silla Observatory (South America), Tenerife Observatory (Europe), Siding Spring Observatory (Australia), Beijing Xinglong Observatory (Asia), Naukluft Plateau Observatory (Africa), Rutherford Appleton Laboratory (Antarctica)]
155
156
Azure OpenAI is listening. Say 'Stop' or press Ctrl-Z to end the conversation.
0 commit comments