Skip to content

Commit c732d65

Browse files
committed
Merge branch 'bugfix/updated_export_script_to_supprot_different_shells' into 'master'
bugfix(esp-adf): Updated export script to support different shells See merge request adf/esp-adf-internal!1426
2 parents 10dc80c + 0f7392c commit c732d65

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

examples/cloud_services/google_translate_device/main/google_tts.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ google_tts_handle_t google_tts_init(google_tts_config_t *config);
5555
/**
5656
* @brief Start sending text to Google Cloud Text-to-Speech and play audio received
5757
*
58-
* @param[in] tts The Text-to-Speech context
59-
* @param[in] text The text
60-
* @param[in] lang_code The language code
58+
* @param[in] tts The Text-to-Speech context
59+
* @param[in] text The text
60+
* @param[in] lang_code The language code
61+
* @param[in] voice_name The voice name
6162
*
6263
* @return
6364
* - ESP_OK
@@ -66,13 +67,13 @@ google_tts_handle_t google_tts_init(google_tts_config_t *config);
6667
esp_err_t google_tts_start(google_tts_handle_t tts, const char *text, const char *lang_code, const char *voice_name);
6768

6869
/**
69-
* @brief Stop playing audio from Google Cloud Text-to-Speech
70+
* @brief Stop playing audio from Google Cloud Text-to-Speech
7071
*
71-
* @param[in] tts The Text-to-Speech context
72+
* @param[in] tts The Text-to-Speech context
7273
*
7374
* @return
74-
* - ESP_OK
75-
* - ESP_FAIL
75+
* - ESP_OK
76+
* - ESP_FAIL
7677
*/
7778
esp_err_t google_tts_stop(google_tts_handle_t tts);
7879

@@ -89,25 +90,25 @@ esp_err_t google_tts_stop(google_tts_handle_t tts);
8990
esp_err_t google_tts_set_listener(google_tts_handle_t tts, audio_event_iface_handle_t listener);
9091

9192
/**
92-
* @brief Cleanup the Text-to-Speech object
93+
* @brief Cleanup the Text-to-Speech object
9394
*
94-
* @param[in] tts The Text-to-Speech context
95+
* @param[in] tts The Text-to-Speech context
9596
*
9697
* @return
97-
* - ESP_OK
98-
* - ESP_FAIL
98+
* - ESP_OK
99+
* - ESP_FAIL
99100
*/
100101
esp_err_t google_tts_destroy(google_tts_handle_t tts);
101102

102103
/**
103-
* @brief Check if the Text-To-Speech finished playing audio from server
104+
* @brief Check if the Text-To-Speech finished playing audio from server
104105
*
105-
* @param[in] tts The Text-to-Speech context
106-
* @param msg The message
106+
* @param[in] tts The Text-to-Speech context
107+
* @param msg The message
107108
*
108109
* @return
109-
* - true
110-
* - false
110+
* - true
111+
* - false
111112
*/
112113
bool google_tts_check_event_finish(google_tts_handle_t tts, audio_event_iface_msg_t *msg);
113114

export.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
#!/bin/bash
22

33
if [ -z "$ADF_PATH" ]; then
4-
basedir=$(dirname "$0")
5-
export ADF_PATH=$(cd "${basedir}"; pwd)
4+
SCRIPT_PATH="${BASH_SOURCE[0]:-$0}"
5+
while [ -h "$SCRIPT_PATH" ]; do
6+
LINK_TARGET="$(readlink "$SCRIPT_PATH")"
7+
if [ "${LINK_TARGET:0:1}" = "/" ]; then
8+
SCRIPT_PATH="$LINK_TARGET"
9+
else
10+
SCRIPT_PATH="$(dirname "$SCRIPT_PATH")/$LINK_TARGET"
11+
fi
12+
done
13+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
14+
export ADF_PATH="$SCRIPT_DIR"
615
fi
16+
717
if [ -z "$IDF_PATH" ]; then
818
export IDF_PATH=$ADF_PATH/esp-idf
919
fi

0 commit comments

Comments
 (0)